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

Support a CI-colon-MACHINE mode #20946

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

cevich
Copy link
Member

@cevich cevich commented Dec 7, 2023

Because the podman machine tests normally run at the end of the chain, it's time consuming for developers to validate machine-only changes. Support a special CI runtime mode, only when a PR is marked as a draft. Update related documentation

Also: Only run machine tests on PRs, never for branches or new tags.

Does this PR introduce a user-facing change?

None

@cevich cevich requested review from edsantiago and baude December 7, 2023 20:15
@openshift-ci openshift-ci bot added release-note-none do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Dec 7, 2023
@cevich cevich force-pushed the machine_run_sooner branch 3 times, most recently from 9f99a4c to 1a69a16 Compare December 8, 2023 14:12
@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

@edsantiago PTAL at this idea. I drank some inspiration in this morning's coffee 😁 IIRC (I can test it) the PR title magic Cirrus-CI env. var values are sticky. In other words, they don't change if you press "re-run". Since PR-merging is blocked for drafts, and a green "Total Success" status, I simply moved the magic-string check there 👌

@cevich cevich requested a review from edsantiago December 8, 2023 14:14
@cevich cevich force-pushed the machine_run_sooner branch from 1a69a16 to d63597b Compare December 8, 2023 16:20
@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

force-push: Woops, forgot to add an exit 1 to the script.

.cirrus.yml Show resolved Hide resolved
@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

@cevich cevich marked this pull request as ready for review December 8, 2023 17:57
@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

@cevich cevich force-pushed the machine_run_sooner branch from d63597b to 256131e Compare December 8, 2023 17:59
@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

Woops: Force-push: Updated conditions so machine tests only run for PRs. We only want the most critical bare-bones checks on branches and new tags to avoid flakes.

@cevich cevich force-pushed the machine_run_sooner branch from 256131e to 06a14f4 Compare December 8, 2023 18:53
@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

@cevich
Copy link
Member Author

cevich commented Dec 8, 2023

TODO: Test w/o magic, w/o draft, confirm all PR-level tests run normally.

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

Comment on lines +1125 to +1130
script: |
if [[ "$CIRRUS_CHANGE_TITLE" =~ CI:MACHINE ]] && [[ -n "$CIRRUS_PR" ]]; then
echo "Error: Risk of untested change merge."
echo "Please remove [CI:MACHINE] from title."
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

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

This is brilliant.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Dec 11, 2023
@rhatdan
Copy link
Member

rhatdan commented Dec 11, 2023

Please remove [WIP] flag from title.

@cevich
Copy link
Member Author

cevich commented Dec 11, 2023

There's at least one more test I need to run.

@cevich cevich changed the title [WIP] Support a [CI:MACHINE] mode Support a CI-colon-MACHINE mode Dec 11, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 11, 2023
Because the podman machine tests normally run at the end of the chain,
it's time consuming for developers to validate machine-only changes.
Support a special CI runtime mode, only when a PR is marked as a draft.
Update related documentation

Also: Only run machine tests on PRs, never for branches or new tags.

Signed-off-by: Chris Evich <[email protected]>
@cevich cevich force-pushed the machine_run_sooner branch from 06a14f4 to 95eb22c Compare December 11, 2023 16:02
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2023
@cevich
Copy link
Member Author

cevich commented Dec 11, 2023

Test: Run w/o magic, w/o draft.

Reviewers: Please double-check my eyeballs, confirm all expected (normal) PR-level tests run/ran. This PR touches some tricky, anti-POLA logical conditions. I could easily have screwed something up.

@cevich
Copy link
Member Author

cevich commented Dec 11, 2023

Okay, I think this is ready now.

@baude
Copy link
Member

baude commented Dec 11, 2023

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 11, 2023
Copy link
Member

@baude baude left a comment

Choose a reason for hiding this comment

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

will merge and immediately put into action.

Copy link
Contributor

openshift-ci bot commented Dec 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude, cevich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@baude
Copy link
Member

baude commented Dec 11, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2023
@baude
Copy link
Member

baude commented Dec 11, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 11, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 9877dc4 into containers:main Dec 11, 2023
90 of 92 checks passed
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Mar 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants