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

Coverity CI changes: remove internal workflow and add 'covscan' label workflow for PRs #7698

Closed

Conversation

justin-stephenson
Copy link
Contributor

No description provided.

Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for taking care of it

workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverity:
coverity_daily:
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this going to be run on each pull request?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I missed that. I added if: ${{ github.event_name == 'schedule' }} to this job

Copy link
Member

Choose a reason for hiding this comment

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

I think we can keep it as single job. Add a step that will get check the labels, if labels are not there and it is a pull request -> skip/cancel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I switched it to a single job with a multi-line if conditional:

+    if: |
+      ${{ github.event_name == 'schedule' }} ||
+      ${{ github.event.label.name == 'coverity' && github.event_name == 'pull_request' }}

# This job likely cannot be re-run on the same day or we will
# hit the build submission limit (see above link)
pull_request_target:
branches: [master]
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't you narrow it down to

types:
- labeled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could be, do you suggest if someone wants to run covscan against their PR more than once they should just remove and re-add the label? If yes I will add a comment in this workflow about this.

Copy link
Member

Choose a reason for hiding this comment

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

Yes. I think that current implementation will run covscan on each push if label is set, won't t? We need to trigger it only on desire. So either by setting the label or maybe by /covscan comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay makes sense, I added the

types:
- labeled

@justin-stephenson justin-stephenson force-pushed the coverity_use_label branch 2 times, most recently from 889b617 to d152355 Compare December 10, 2024 13:55
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverity:
if: |
${{ github.event_name == 'schedule' }} ||
${{ github.event.label.name == 'coverity' && github.event_name == 'pull_request' }}
Copy link
Member

Choose a reason for hiding this comment

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

pull_request_target instead of pull_request?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

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

LGTM, let's see how it works

@alexey-tikhonov
Copy link
Member

Pushed PR: #7698

  • master
    • c6294f5 - ci: Add workflow for 'coverity' label in PRs
    • e58cf80 - ci: Remove internal covscan workflow
  • sssd-2-10
    • 31160a3 - ci: Add workflow for 'coverity' label in PRs
    • ab95df5 - ci: Remove internal covscan workflow
  • sssd-2-9
    • 33855f7 - ci: Add workflow for 'coverity' label in PRs
    • 2b51682 - ci: Remove internal covscan workflow
  • sssd-2-9-4
    • a989aba - ci: Add workflow for 'coverity' label in PRs
    • 03774f7 - ci: Remove internal covscan workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants