Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percy Build Wait command exiting immediately on changes. #1655

Open
Kaedeko opened this issue Jul 10, 2024 · 3 comments
Open

Percy Build Wait command exiting immediately on changes. #1655

Kaedeko opened this issue Jul 10, 2024 · 3 comments
Labels
✨ enhancement New feature or request

Comments

@Kaedeko
Copy link

Kaedeko commented Jul 10, 2024

The problem

When using --fail-on-changes and --pass-if-approved, the documented behaviour looks like it should be polling the build until it's approved, up until the timeout value, default 10 minutes.

What I'm seeing locally and in pipeline is the command exiting immediately after a build is completed.

e.g.

npx percy build:wait --fail-on-changes --pass-if-approved -b <build-id> -t 900000 -i 10000
[percy] Build #1013 finished! <url removed>
[percy] Found 1 changes

Script then exits. Happens with all our builds. If there's an issue with how i'm using the script then it might be more of a documentation issue than anything else but it certainly feels like a bug.

Effectively, wait isn't waiting.

Environment

  • Node version: 21.5.0
  • @percy/cli version: 1.28.9
  • Version of Percy SDK you’re using: 3.1.2
  • If needed, a build or snapshot ID: N/A / All
  • OS version: Windows 11 & the Docker node:lts-alpine image
  • Type of shell command-line [interface]: Powershell + bash

Debug logs

npx percy build:wait --fail-on-changes --pass-if-approved -b 35202590 -t 900000 -i 10000 -v
[percy:config] Found config file: .percy.yml (0ms)
[percy:config] Using config:
{
  version: 2,
  snapshot: {
    widths: [
      1920
    ],
    minHeight: 1280,
    percyCSS: '',
    enableJavaScript: false,
    cliEnableJavaScript: true,
    disableShadowDOM: false
  },
  discovery: {
    networkIdleTimeout: 100
  },
  upload: {
    files: '**/*.{png,jpg,jpeg}',
    ignore: '',
    stripExtensions: false
  }
} (9ms)
[percy:env] Detected ci as null (9ms)
[percy:env] Detected commit as null (0ms)
[percy:env] Detected branch as null (0ms)
[percy:env] Detected git as <Removed Commit Information> (59ms)
[percy:client] Waiting for build 35202590... (27ms)
[percy:client] Get build 35202590 (0ms)
[percy:env] Detected info as null (0ms)
[percy:cli:build:wait] Build #1013 finished! https://percy.io/0599cc3c/Ziggy/builds/35202590 (470ms)
[percy:cli:build:wait] Found 1 changes (0ms)

Code to reproduce issue

N/A - Provided above.

Copy link

This issue is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the 🍞 stale Closed due to inactivity label Jul 30, 2024
@Kaedeko
Copy link
Author

Kaedeko commented Jul 30, 2024

Still an ongoing issue.

@github-actions github-actions bot removed the 🍞 stale Closed due to inactivity label Aug 6, 2024
@ninadbstack
Copy link
Contributor

@Kaedeko the feature is working as expected, its currently pass-if-approved and not pass until approved - with some timeout. pass-if-approved usually means no differences or auto approved due to some other reason like carry forwarded snapshots or auto approve branch etc

You can easily add a bash loop if you want to wait till build is approved manually on dashboard.

If you need this as a feature - with a flag like --wait-for-approval with a timeout - please raise the same via support and product managers could look into it

@ninadbstack ninadbstack added the ✨ enhancement New feature or request label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants