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 appendTemplatedValues to pullRequest generator (#11408) #21110

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

Conversation

dudo
Copy link

@dudo dudo commented Dec 9, 2024

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 a review from a team as a code owner December 9, 2024 17:47
Copy link

bunnyshell bot commented Dec 9, 2024

🔴 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_pr_generator branch 4 times, most recently from 5e28575 to efb5e26 Compare December 9, 2024 19:42
@dudo dudo requested a review from a team as a code owner December 9, 2024 20:11
dudo added 4 commits December 9, 2024 12:11
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_pr_generator branch from 6fb7735 to 9a44fa1 Compare December 9, 2024 20:12
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

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

Project coverage is 55.20%. Comparing base (6897c2e) to head (7313fcc).

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   #21110      +/-   ##
==========================================
+ Coverage   55.16%   55.20%   +0.03%     
==========================================
  Files         324      324              
  Lines       55603    55606       +3     
==========================================
+ Hits        30674    30695      +21     
+ Misses      22303    22289      -14     
+ Partials     2626     2622       -4     

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

Copy link
Contributor

@todaywasawesome todaywasawesome left a comment

Choose a reason for hiding this comment

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

Looks good, I don't think we need to do any checks here because they're all done on the values anyway so I don't see any issues with that.

Thanks for the PR 💪

@todaywasawesome todaywasawesome enabled auto-merge (squash) December 11, 2024 17:08
@dudo
Copy link
Author

dudo commented Dec 13, 2024

I can't seem to run make codegen locally on Apple silicon. Could I get an assist running that, @todaywasawesome?

ERROR: failed to solve: docker.io/library/golang:1.23.4@sha256:a5ec4a1403fb63b1afc4643d707a4ee11ab4b4637fb73afa3f05ee67b9282c92: failed to resolve source metadata for docker.io/library/golang:1.23.4@sha256:a5ec4a1403fb63b1afc4643d707a4ee11ab4b4637fb73afa3f05ee67b9282c92: no match for platform in manifest: not found

@todaywasawesome
Copy link
Contributor

You got it, I'll see if I can do that tomorrow.

@todaywasawesome
Copy link
Contributor

This isn't an apple silicon issue, it looks like that specific image version is just missing for some reason. I updated it and ran locally but this should be merged separately. Opening a PR now.

@todaywasawesome
Copy link
Contributor

New PR #21174

@dudo
Copy link
Author

dudo commented Dec 14, 2024

That PR helped, thanks! I'm struggling with permissions, though, which seems odd considering this happens within a container. There's a slew of these errors:

+ mkdir -p /go/src/github.com/gogo
mkdir: cannot create directory '/go/src/github.com/gogo': Permission denied
+ rm -rf /go/src/k8s.io/apimachinery
+ mkdir -p /go/src/k8s.io
mkdir: cannot create directory '/go/src/k8s.io': Permission denied
+ rm -rf /go/src/k8s.io/api
+ mkdir -p /go/src/k8s.io
mkdir: cannot create directory '/go/src/k8s.io': Permission denied
+ rm -rf /go/src/k8s.io/apiextensions-apiserver
+ mkdir -p /go/src/k8s.io
mkdir: cannot create directory '/go/src/k8s.io': Permission denied
++ IFS=,
++ echo github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1
++ IFS=,
++ echo +k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
+ go-to-protobuf --go-header-file=/go/src/github.com/argoproj/argo-cd/hack/custom-boilerplate.go.txt --packages=github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1 --apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,+k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 --proto-import=/go/src/github.com/argoproj/argo-cd/vendor --proto-import=/dist/protoc-include --output-dir=/go/src/
2024/12/14 05:37:33 protoc -I . -I /go/src/ -I /go/src/github.com/argoproj/argo-cd/vendor -I /dist/protoc-include --gogo_out=/go/src/ /go/src/k8s.io/api/core/v1/generated.proto
2024/12/14 05:37:33 Could not make proto path relative: /go/src/k8s.io/api/core/v1/generated.proto: No such file or directory

2024/12/14 05:37:33 Unable to run protoc on k8s.io.api.core.v1: exit status 1
make: *** [Makefile:210: protogen-fast] Error 1
make: *** [codegen] Error 2

I'm running

make codegen

Is there some env that I'm missing? Or an option in the command?

@lukepatrick
Copy link
Contributor

Does this overlap with this other PR ? #16507

@dudo
Copy link
Author

dudo commented Dec 15, 2024

It does, @lukepatrick ! And he beat me by a week 😅

As much as I'd like to be a contributor, I say we just grab the specs from this PR, and get @crenshaw-dev 's PR over the finish line in time for the RC.

@lukepatrick
Copy link
Contributor

A week+1year. Either look good, I would vote for yours, likely no rebase challenges like the other, and all the more contributors the better.

@dudo
Copy link
Author

dudo commented Dec 21, 2024

OMG... I completely glossed over the year, lol.

I'm happy to push this one to the finish line. I'm struggling to get make codegen to fix the failing specs. Any suggestions, @lukepatrick ?

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
3 participants