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(3181): virtual job is not triggered by webhook #3260

Conversation

y-oksaku
Copy link
Contributor

@y-oksaku y-oksaku commented Dec 26, 2024

Context

Virtual job builds are not triggered directly by webhook.

shared:
  image: node:20

jobs:
  main:
    requires: [ ~commit, ~pr ]
    steps:
      - echo: echo 'test'
    annotations:
      screwdriver.cd/virtualJob: true
  foo:
    requires: [ main ]
    steps:
      - echo: echo 'test'

After screwdriver-cd/models#635, the virtual job builds are not triggered in eventFactory, so we should trigger them other place.

Objective

Trigger the virtual job builds in webhook process.

References

Issue

PR

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 Dec 26, 2024

Coverage Status

coverage: 95.356% (+0.03%) from 95.329%
when pulling a4ef282 on sonic-screwdriver-cd:fix-virtual-job-trigger
into 696ce8c on screwdriver-cd:master.

kumada626
kumada626 previously approved these changes Dec 27, 2024
`Failed to pullRequestOpened: [${hookId}, pipeline:${options.pipeline && options.pipeline.id}]: ${err}`
);
for (const event of hasBuildEvents) {
const virtualJobBuilds = event.builds.filter(b => b.status === 'CREATED');
Copy link
Member

Choose a reason for hiding this comment

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

is there a more explicit check that can be used on the build/job to denote that it's a virtual Job Build ?
Would there be any other scenario for CREATED build status

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I fixed.

@VonnyJap
Copy link
Member

VonnyJap commented Jan 2, 2025

@y-oksaku - Could you kindly take a look at PR #3261 and consider closing your PR if they are indeed duplicates? Thank you!

@y-oksaku
Copy link
Contributor Author

y-oksaku commented Jan 4, 2025

@VonnyJap

Thank you. I'll close this PR.
Maybe some tests for the createEvent helper is needed.

@y-oksaku y-oksaku closed this Jan 4, 2025
@y-oksaku y-oksaku deleted the fix-virtual-job-trigger branch January 4, 2025 05:00
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.

5 participants