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

fix(2981): remote join wait on downsream jobs during restart #3178

Merged
merged 14 commits into from
Sep 3, 2024

Conversation

yakanechi
Copy link
Contributor

@yakanechi yakanechi commented Aug 27, 2024

Context

fix #2981
When an upstream job of the remote-join job is restarted, remote-join job immediately runs reusing build status from previous event.

Objective

When a remote join job's upstream jobs are restarted, the remote join job will use the post-restart build status as the trigger for jobs that may run from the restart job.

Enumerate jobs started after the restart job, referring to the subgraph filter in the UI, and do not use the recent build status of the group event.

  • About the test
    We found another bug related to remote join while working on this. (Remote join jobs are not triggered correctly on restart #3177)
    Therefore, a test has been added to the “Tests for behavior not ideal” section
    Also, with this fix, the test that was originally in “Tests for behavior not ideal” works as expected so that it will be removed and the test that was xit will be executed.

References

#2981
#3177

License

I confirm that this contribution is made under a BSD license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@coveralls
Copy link

coveralls commented Aug 27, 2024

Coverage Status

coverage: 95.229% (-0.01%) from 95.24%
when pulling fde0840 on sonic-screwdriver-cd:fix_2981
into 919680b on screwdriver-cd:master.

plugins/builds/triggers/helpers.js Outdated Show resolved Hide resolved
plugins/builds/triggers/helpers.js Outdated Show resolved Hide resolved
plugins/builds/triggers/helpers.js Outdated Show resolved Hide resolved
Copy link
Contributor

@y-oksaku y-oksaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to consider excluding a disabled job from subsequent jobs.
(Some users disable a job to skip executing in a restart event.)

@yakanechi
Copy link
Contributor Author

All fixes have been done.
The following fixes will be made in a new PR

We might need to consider excluding a disabled job from subsequent jobs.
(Some users disable a job to skip executing in a restart event.)

* @param {String} [startNode] Starting/trigger node
* @returns {Array<String>} subsequent job names
*/
function subsequentJobFilter(workflowGraph, startNode) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly but would something like getDownstreamJobs or getSubsequentJobs be more clear?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkyi
Thanks for your comment.
Renamed to"getSubsequentJobs" because it is used not only for dosntream but also for normal events.

@tkyi tkyi merged commit 7d4e6c8 into screwdriver-cd:master Sep 3, 2024
2 checks passed
@yakanechi yakanechi deleted the fix_2981 branch September 3, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote-join job doesn't wait on downstream jobs during restart
4 participants