-
Notifications
You must be signed in to change notification settings - Fork 101
ci: Introduce <backend|sphinx> jobs as "all green" required jobs
#1514
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
Conversation
a1e1f22 to
67f1ed4
Compare
Coverage Report for backend
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
67f1ed4 to
77eb86a
Compare
ci.yml workflow as the "must-be-green" CI entry point<backend|sphinx>-all-green jobs as required jobs
d462471 to
117b615
Compare
<backend|sphinx>-all-green jobs as required jobs<backend|sphinx> jobs as all green required jobs
117b615 to
563c861
Compare
b8a1a97 to
e7b42f7
Compare
6d7dc53 to
bf52fc7
Compare
1d74549 to
bf52fc7
Compare
<backend|sphinx> jobs as all green required jobs<backend|sphinx> jobs as "all green" required jobs
bf52fc7 to
7fb05f8
Compare
7fb05f8 to
f48e20f
Compare
5704864 to
dcebaa5
Compare
rouk1
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.
Cool !
| pull-requests: read | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
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.
Could you explain why you need to pin a specific version here ?
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.
This is only a security issue and a good practice promoted by GH after the corruption of the famous tj-actions/changed-files.
tj-actions/changed-files#2463 (comment)
https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
You can help mitigate this risk by following these good practices:
Pin actions to a full length commit SHA
Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.
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.
This is also a tradeoff. If a pinned version contains a CVE then you wont get the fix for free.
To me this is too much paranoia.
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.
I know, but there is actually no better solution to mitigate this issue, and it's promoted by GH.
By pinning an approved version, we avoid to pull future potential compromised versions.
|
|
||
| ## Context and Problem Statement | ||
|
|
||
| With external contributions related to ESOC, the number of pull-request is growing fast. |
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.
Please disambiguate thie acronym.
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.
European Summer of Code, sorry too late... 😶🌫️ .
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.
https://duckduckgo.com/?q=ESOC
leads to European Space Operations Centre 🤷🏻♂️
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.
I will update it in another PR, thanks!
…robabl-ai#1514) Some changes to prepare the setup of the GH merge queue, for which we need to specify the jobs required to succeed: - Set filenames as workflow/job names to avoid confusion, - Add `backend` job that can be used as required 🟢 job, - Add `sphinx` job that can be used as required 🟢 job, - Add explicit restricted permissions to the `sphinx` workflow (no worries, they were already restricted to read-only). --- For a job to be required, its **workflow** has to be executed and not skipped. Before this PR, we skipped entire workflow via path filtering, which is incompatible with "required jobs". https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks  Now we always execute workflows, but skip jobs individually based on modified files.
Some changes to prepare the setup of the GH merge queue, for which we need to specify the jobs required to succeed:
backendjob that can be used as required 🟢 job,sphinxjob that can be used as required 🟢 job,sphinxworkflow (no worries, they were already restricted to read-only).For a job to be required, its workflow has to be executed and not skipped.
Before this PR, we skipped entire workflow via path filtering, which is incompatible with "required jobs".
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
Now we always execute workflows, but skip jobs individually based on modified files.