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: Add values to PR generator #21557

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

dudo
Copy link

@dudo dudo commented Jan 18, 2025

Fixes #11408

This seems as though it'd be something that we'll want to roll out to all the generators. It seems more flexible than adding something like branchParamPrefix, and less disruptive than adding a new key for pr_branch which is superfluous, and may end up being deprecated at some point in the future.

If there's appetite to add it to the rest of the generators, I'm happy to add that to the PR, but it's beyond the scope of the linked issue.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@dudo dudo requested review from a team as code owners January 18, 2025 21:01
Copy link

bunnyshell bot commented Jan 18, 2025

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@dudo dudo force-pushed the add_values_to_generators branch from 1e73127 to da6850a Compare January 18, 2025 21:05
@dudo dudo changed the title Add values to PR generator fix: Add values to PR generator Jan 18, 2025
@dudo
Copy link
Author

dudo commented Jan 18, 2025

(That DCO check is silly... my commit is verified...)

@dudo
Copy link
Author

dudo commented Jan 18, 2025

We can close #16507 once this is merged.

Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
How are the changes in test/container/Dockerfile file related to the generator values?

@dudo
Copy link
Author

dudo commented Jan 19, 2025

Hey @reggie-k !

Those changes are the only way I could actually run make codegen on my machine. It was failing with a message about permissions in the /go folder, and this ensures there's a folder to have permissions on, then adds them.

@reggie-k
Copy link
Member

Hey @reggie-k !

Those changes are the only way I could actually run make codegen on my machine. It was failing with a message about permissions in the /go folder, and this ensures there's a folder to have permissions on, then adds them.

Could you run make codegen-local instead? If that works, I would suggest to open another issue for the permissions related error for make codegen and undo the changes for the test Dockerfile.

@dudo
Copy link
Author

dudo commented Jan 20, 2025

I don't love installing a bunch of random dependencies on my machine, especially with this using the older go path. Containerization keeps things... contained 😅.

Are you (or anyone) able to run make codegen successfully? I can't imagine I'm missing some other local environment var that's not getting picked up. The changes I made addressed some warnings (case of AS and ENV syntax) then just ensured /go/src is present and owned by the user provided. Pretty innocuous (even though it was blocking me). If you insist, I'll open another PR - just trying to keep the ball rolling here.

Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

Totally legit to stick to the virtualized chain, I take your point.

From the perspective of maintainers' tracking of changes, and users visibility, the changes in the Dockerfile should go to a separate PR.
I opened an issue to track this separately:
#21623
Your PR for the Dockerfile will now be even smaller, having this being merged already:
#21556
And can be merged quickly to unblock this PR (even though all the codegen generated manifests are already in this PR and are not really blocked)

dudo and others added 16 commits January 24, 2025 19:47
Signed-off-by: Brett C. Dudo <[email protected]>
…argoproj#21511)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Brett C. Dudo <[email protected]>
… ApplicationSet (argoproj#21577)

Signed-off-by: Revital Barletz <[email protected]>
Co-authored-by: Regina Voloshin <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…atus when no clusters match the policy (argoproj#21296) (argoproj#21297)

Signed-off-by: Michele Baldessari <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Laurent Lavaud <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…j#15185) (argoproj#21586)

Signed-off-by: Jacob Colvin <[email protected]>
Co-authored-by: Blake Pettersson <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Matthieu MOREL <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Softyy and others added 19 commits January 24, 2025 19:47
Signed-off-by: Christopher J. Adkins <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: CI <[email protected]>
Co-authored-by: CI <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Matthieu MOREL <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Matthieu MOREL <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Matthieu MOREL <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
argoproj#21658)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
@dudo dudo force-pushed the add_values_to_generators branch from 434e537 to 9f59455 Compare January 25, 2025 03:47
@dudo dudo requested a review from a team as a code owner January 25, 2025 03:47
@dudo
Copy link
Author

dudo commented Jan 25, 2025

Sorry for the delay, here. Updated!

Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@544aea1). Learn more about missing BASE report.

Files with missing lines Patch % Lines
applicationset/generators/pull_request.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #21557   +/-   ##
=========================================
  Coverage          ?   53.52%           
=========================================
  Files             ?      339           
  Lines             ?    57185           
  Branches          ?        0           
=========================================
  Hits              ?    30606           
  Misses            ?    23945           
  Partials          ?     2634           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dudo dudo requested a review from reggie-k January 25, 2025 04:26
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.

Matrix generator of SCM + PullRequest doesn't work