-
Notifications
You must be signed in to change notification settings - Fork 52
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
Skip PCT by default on PRs #2034
Conversation
launchable("record tests --session ${session} --group ${repository} maven './**/target/surefire-reports' './**/target/failsafe-reports'") | ||
if (BRANCH_NAME == 'master' || env.CHANGE_ID && pullRequest.labels.contains('full-test')) { | ||
branches = [failFast: false] | ||
lines.each {line -> |
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.
Hide whitespace to see real change
def session = readFile(sessionFile).trim() | ||
launchable("record tests --session ${session} --group ${repository} maven './**/target/surefire-reports' './**/target/failsafe-reports'") | ||
if (BRANCH_NAME == 'master' || env.CHANGE_ID && pullRequest.labels.contains('full-test')) { | ||
branches = [failFast: false] |
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.
equivalently,
branches = [failFast: false] | |
branches = [:] |
@@ -43,3 +43,4 @@ actions: | |||
spec: | |||
labels: | |||
- dependencies | |||
- full-test |
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.
If we are updating PCT, presumably we want to run it!
Could also consider adding Lines 3 to 9 in 29b6f89
plugin-pom bumps as well as groovy-maven-plugin and groovy-all ; not sure if DB makes that possible.
|
Could also consider |
We could also revert #2032 for the prep stage, keeping it only for the pct branches, so that PRs get tested more promptly. |
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 places the burden of running the full test suite and dealing with the failures on whoever happens to be cutting a release, whenever they happen to be cutting a release. I think this negatively incentivizes running tests and cutting releases. We want to create positive incentives for maintainership duties, not negative ones.
In contrast, my proposal creates positive incentives for maintainership duties by having automation open PRs to run automated tests early (before release) and often (three times a week). More positive incentives are created by opening PRs (thus allowing for group discussion), which sends out notifications and thus urges people to take action early (as opposed to this proposal, in which nobody would notice if a test started failing until they happened to be interested in doing a release).
The only situation in which I would accept your proposal is one in which you volunteer to regularly (at least once a month) run the build, deal with failures, re-run the build if necessary, and cut the release. And this would mean doing the work, not leaving comments about what "needs to be" done.
@dduportal no, I meant #2032: use the |
I have some preference for #2031 but would also be willing to use the workflow proposed in this pull request. I agree with the observation from @basil that this method places a greater burden on the maintainer that generates a release, but I think that can be acceptable if we have some form of rotation of maintainers that are working to assure a release happens at least once a week. I suggest a release at least once a week because in the past 40 BOM releases we've averaged 13 commits per release and we easily have 13 pull requests per week. |
Not just the maintainer that performs a BOM release, but also anyone who happens to need to do a full test run: e.g. someone doing unrelated core/PCT work that happens to require a full test run. Unless a full test run is regularly scheduled and unless BOM maintainers are notified to take action when it fails, it is possible that we would fall behind on these fronts and that the unlucky person doing a BOM release or a core/PCT change would have to face the consequences (which would negatively incentivize them to do such work). |
A rotation would alleviate my concern about negative incentives. If the other maintainers agree to form such a rotation, I would support the approach in this PR and would even be willing to participate as one of the members of the rotation. If the other maintainers want to proceed with this PR but will not commit to such a rotation, then I would remain hesitant about the approach in this PR.
Yes, a once a week cadence (similar to weekly core releases) sounds about right to me for the reasons you gave. |
I do not support a rotation / commitment on this. |
I was not proposing any sort of rotation, whatever that means. I sketched a way for trunk to be automatically tested on a regular schedule (weekly, as an example) that ought to deliver the usual GitHub notifications, as well as providing a placeholder PR that could be self-assigned, used to collect notes about bisections in progress, etc. It could be amended with actual fixes I suppose, or simply be closed and real PRs opened (with I had hoped to be able to open a PR with no commits, which would be beneficial since if it passed then Just an option. Probably not worth spending too much time debating design since it is simple enough to revert or modify any proposal if it is not working out the way it was hoped. |
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 was not proposing any sort of rotation, whatever that means.
Yeah I know, my point was that some positive incentive is needed for the system to sustain itself, and it was missing in the first version of this PR. That would have led to a negative incentive for doing certain types of work, hence my negative feedback about the first version of this PR. In my mind the problem can be solved by creating a positive incentive to test early and often, either by creating automation that runs builds and pings people regularly or by having the maintainers commit to doing this manually. Since this PR now creates a positive incentive in the form of cron-scheduled builds and an automated PR, my concern is now alleviated. And since it is simpler than #2031, I think I prefer this PR to #2031.
I like simplicity over what #2031 was suggesting 😅 |
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.
One minor issue otherwise LGTM.
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.
Looks good to me.
The suggested change from @jetersen seems like a good safety measure by always deleting the full-tests
branch whether or not it has been pushed. I was unable to create a condition where the git branch -d full-tests
would fail, but there may be such a case. Pull request is approved whether or not the suggestion is accepted.
Still a bit incomplete without the following portions that were discussed:
+0 from me in this incomplete state. This would be a +1 if these action items were completed. |
Co-authored-by: Joseph Petersen <me@jetersen.dev>
#2034 (comment) but sure, fine with me to add that here.
Yes, could be done independently but may as well prepare it here since it seems there is consensus we should try this approach. Will try to do both today. |
+0 on this: I'm not in favor neither I'm against this:
I don't see a reason to block this PR for this chore. Thanks for the work, proposals, reviews and solutions on this and on #2031 . |
The |
I think this is ready to go if there are no objections from the last couple of commits? We can see how it goes for a couple of weeks and adjust as needed. |
I've started a separate build of the master branch in hopes that the DNS resolution failures won't hit this time. Infra team is investigating those failures in jenkins-infra/helpdesk#3559 |
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Enable auto-merge for Dependabot PRs |
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.
git commit --allow-empty --message 'Phony commit' | ||
git push origin full-tests | ||
# Not using --draft to ensure notifications are sent: | ||
gh pr create --head --title 'Testing master (do not merge)' --body 'Close this PR if it passes; otherwise please fix failures.' --reviewer jenkinsci/bom-developers --label full-test |
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.
Tested in #2052.
Simpler alternative to #2031 to consider. By comparison, it retains the straightforward release-from-
master
behavior, so CD configuration should not need any adjustment, and there is no need to track the status of release branch merges. Also keeps #1993, so PCT will be run only when you ask for it in a PR, or explicitly testmaster
(perhaps when planning a release). We can also consider runningmaster
builds on a schedule, such as@nightly
.I believe it is unnecessary to use a dedicated release branch. Such a system makes sense for repositories which:
None of those criteria seem to apply to a developer tool like a BOM which after all is merely a convenience to help you manage a dependency list. If some change introduced a PCT regression, we can generally take our time fixing it, whether by releasing some plugin with a test or behavioral change and integrating it; reverting the problematic update; or adding a test to an exclusion list.