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 201 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 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 ?

auto-merge was automatically disabled January 18, 2025 18:13

Head branch was pushed to by a user without write access

dudo and others added 8 commits January 18, 2025 10:29
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Signed-off-by: Joowon Lim <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.3.4 to 0.3.5.
- [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
- [Changelog](https://github.com/cyphar/filepath-securejoin/blob/main/CHANGELOG.md)
- [Commits](cyphar/filepath-securejoin@v0.3.4...v0.3.5)

---
updated-dependencies:
- dependency-name: github.com/cyphar/filepath-securejoin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
…oproj#21095)

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 45.0.4 to 45.0.5.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@4edd678...bab30c2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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: Amine Benseddik <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
linghaoSu and others added 24 commits January 18, 2025 10:30
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <[email protected]>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <[email protected]>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <[email protected]>

---------

Signed-off-by: eadred <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…roj#21485)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.69.2 to 1.69.4.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.69.2...v1.69.4)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
…rgoproj#16253) (argoproj#21491)

* (fix:appset) update gitlab SCM provider to search on parent folder

fix argoproj#16253

Signed-off-by: Prune <[email protected]>

* adding test-case that replicated the new Gitlab API behaviour

Signed-off-by: Prune <[email protected]>

* add comments to the case

Signed-off-by: Prune <[email protected]>

---------

Signed-off-by: Prune <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…goproj#21514)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.55.5 to 1.55.6.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG_PENDING.md)
- [Commits](aws/aws-sdk-go@v1.55.5...v1.55.6)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
…rgoproj#21512)

Bumps [chromedriver](https://github.com/giggio/node-chromedriver) from 131.0.5 to 132.0.0.
- [Commits](giggio/node-chromedriver@131.0.5...132.0.0)

---
updated-dependencies:
- dependency-name: chromedriver
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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]>
* groupview-filter-fix

Signed-off-by: Surajyadav <[email protected]>

* count-logic-change

Signed-off-by: Surajyadav <[email protected]>

* lint-fixes

Signed-off-by: Surajyadav <[email protected]>

---------

Signed-off-by: Surajyadav <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…fixes argoproj#18998) (argoproj#21298)

* fix: correctly set compareWith when requesting app refresh with delay

Signed-off-by: Xiaonan Shen <[email protected]>

* test: add UT

Signed-off-by: Xiaonan Shen <[email protected]>

---------

Signed-off-by: Xiaonan Shen <[email protected]>
Co-authored-by: 沈啸楠 <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
* minor change to use WithAuthToken

Signed-off-by: [email protected] <[email protected]>

* minor change to use WithAuthToken

Signed-off-by: [email protected] <[email protected]>

* Update applicationset/services/scm_provider/github.go

Co-authored-by: Nitish Kumar <[email protected]>
Signed-off-by: Adam Buran <[email protected]>

* remove ctx from NewGithubProvider

Signed-off-by: aburan28 <[email protected]>

* remove ctx from NewGithubProvider

Signed-off-by: aburan28 <[email protected]>

* remove unused parameter

Signed-off-by: aburan28 <[email protected]>

* update readthedogs.yml to allow for builds

Signed-off-by: aburan28 <[email protected]>

---------

Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: aburan28 <[email protected]>
Co-authored-by: Nitish Kumar <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
argoproj#21535)

Bumps library/golang from 1.23.4 to 1.23.5.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
Bumps library/golang from 1.23.4 to 1.23.5.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
…rgoproj#21513)

Bumps google.golang.org/protobuf from 1.36.2 to 1.36.3.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
…oproj#21473)

---------

Signed-off-by: reggie-k <[email protected]>
Signed-off-by: Regina Voloshin <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
```shell
$ crane digest docker.io/library/ubuntu:24.04
sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
```

Signed-off-by: Marco Franssen <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
* e2e

Signed-off-by: rumstead <[email protected]>

* fix(appset): don't requeue on status changes

Signed-off-by: rumstead <[email protected]>

* fix spelling

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: rumstead <[email protected]>

* merge in annotation changes

Signed-off-by: rumstead <[email protected]>

* merge in annotation changes

Signed-off-by: rumstead <[email protected]>

* add more tests

Signed-off-by: rumstead <[email protected]>

* lint fix

Signed-off-by: rumstead <[email protected]>

* Update applicationset/controllers/applicationset_controller.go

Co-authored-by: Ishita Sequeira <[email protected]>
Signed-off-by: rumstead <[email protected]>

* fix linting

Signed-off-by: rumstead <[email protected]>

* fix linting

Signed-off-by: rumstead <[email protected]>

---------

Signed-off-by: rumstead <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Co-authored-by: Ishita Sequeira <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…#21425)

If using the sync waves annotations currently ArgoCD does not wait
for the Subscription to be fully installed. Root cause is that
the first update that includes `.status` doesn't include the information
that the installation is still pending.

To be able to wait for the operator to be installed, the `.status.state`
can be checked.

Signed-off-by: Thomas Müller <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
…ories. (argoproj#21118)

---------

Signed-off-by: Jagpreet Singh Tamber <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Brett C. Dudo <[email protected]>
) (argoproj#20671)

---------

Signed-off-by: Matt Finkel <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]>
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 ae1bec3 to b03990d Compare January 18, 2025 18:30
@dudo dudo requested a review from a team as a code owner January 18, 2025 18:30
@dudo
Copy link
Author

dudo commented Jan 18, 2025

@todaywasawesome Revisiting this. I finally got make codegen to work. I had to modify the Dockerfile, though - I'm not sure how anyone else was able to run this otherwise 😅

Merge commits showed up after I ran the command suggested by DCO... it's not pretty... successive calls to satisfy DCO (via rebasing) are a nightmare now. I'm going to open a new PR.

ALSO, is there appetite to add values to all the generators? I have time this weekend to tackle that.

@dudo
Copy link
Author

dudo commented Jan 18, 2025

#21557

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