-
Notifications
You must be signed in to change notification settings - Fork 22
Support Circle 2.0 CIRCLE_WORKFLOW_WORKSPACE_ID as parallel nonce. #45
Conversation
|
Note that the workflow id changes when you "Rerun failed builds". I.e. if you send snapshots from multiple jobs, this will make it create a new percy build with potentially missing snapshots. |
|
@teeberg interesting point — are you sure? I'd expect "Rerun Failed Jobs" should only affect the jobs within the workflow, not the instance of the workflow itself. Admittedly I haven't tested it. |
|
I am :) There isn't really documentation about these environment variables as far as I could find, but we ended up using |
|
As for
Rerunning failed jobs actually creates a new workflow. You can see that on the workflows dashboard and, when you click into the new workflow, its new URL with a new workflow ID |
|
Yup I just tried this and it seems like that's the behavior (also you're correct, the ONLY documentation I see on the web for that env var is your comments 😶 ). I'm not sure if this is 100% what we want though, because you can also "Re-run" and entire build that was successful — say if you want to re-trigger a deployment or something. In that case we would want Percy to create a new build and not try to re-use the old nonce. I'm not sure which is more common. |
|
with "Re-run an entire build", you mean rerun the whole workflow? In that case, you get a new workspace ID, so I think that shouldn't be an issue. Our issues with this approach are different: If you have to resort to using the workspace ID, that means you're creating the percy build from different circle jobs. As soon as you start doing that and want to support rerunning failed jobs, now you have to figure out how many If I had to re-do our percy integration today, I would write all percy artifacts to the workspace and have a final teardown job at the end of the whole test suite to submit them all. Then there would be no parallelism, no worrying about which undocumented env variable to use, and you could rerun your failed jobs as many times as you like. But I guess dictating how to use CircleCI is outside of this library's scope :) |
djones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍍 LGTM
|
@teeberg we have tested and confirmed that |
|
Released in 2.0.1 |
No description provided.