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

feat(application): Add support for Kustomize Patches #210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevendborrelli
Copy link
Contributor

@stevendborrelli stevendborrelli commented Oct 29, 2024

Description of your changes

  • Adds support for Kustomize Patches
  • updates upstream ArgoCD to v2.12.6

Fixes #208

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review. It looks like linting is broken in the Makefile.

How has this code been tested

We've tested this successfully internally, also confirmed by comment #208 (comment).

@stevendborrelli
Copy link
Contributor Author

I'm a little unsure of the goverter conversions, there are a few fields missing that I have commented out.

@stevendborrelli stevendborrelli changed the title WIP: Add support for Kustomize Patches Add support for Kustomize Patches Oct 30, 2024
@stevendborrelli
Copy link
Contributor Author

@blakepettersson There are new fields I was pulling from main that aren't in the last release. I've removed them in commit: 966a5ae.

@stevendborrelli
Copy link
Contributor Author

@janwillies @MisterMX could we get a review of this?

@janwillies
Copy link
Collaborator

Thanks for the PR @stevendborrelli! Changes look good to me, figuring out why the linter fails

Copy link
Collaborator

@MisterMX MisterMX 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 to me so far. I don't see any major issues - I haven't tested it by myself, though.

go.mod Outdated Show resolved Hide resolved
@MisterMX MisterMX changed the title Add support for Kustomize Patches feat(application): Add support for Kustomize Patches Nov 27, 2024
Copy link
Collaborator

@MisterMX MisterMX left a comment

Choose a reason for hiding this comment

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

Looks already good to me. @stevendborrelli can you fix the one last thing and squash your changes into a single commit using the PR's title?

go.mod Outdated Show resolved Hide resolved
@stevendborrelli
Copy link
Contributor Author

@MisterMX I've squashed the commits

Copy link
Collaborator

@MisterMX MisterMX left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you very much @stevendborrelli!

@MisterMX
Copy link
Collaborator

@stevendborrelli can you fix the linter issues?

@stevendborrelli
Copy link
Contributor Author

@MisterMX Yes, I will take a look.

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

update libraries for trivy scan issues

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

address linter issues

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

lint scan issues

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

linter fixes

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

update linter

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

trigger linter

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

test linter

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

update github action and go version

Signed-off-by: Steven Borrelli <[email protected]>
@stevendborrelli
Copy link
Contributor Author

I've addressed all linter issues I can find with 1.56.x, updated the GitHub action actions/upload-artifact since v3 was deprecated.

I'd like this PR to get merged as I think the Github runner is unable to run the Linter action.

The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.

If I run the linter locally it runs fine:

$ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.56.2 golangci-lint run -v
level=info msg="[config_reader] Config search paths: [./ /app / /root]"
level=info msg="[config_reader] Used config file .golangci.yml"
level=info msg="[lintersdb] Active 43 linters: [asasalint asciicheck bidichk bodyclose contextcheck durationcheck errcheck errchkjson errorlint exhaustive exportloopref gocheckcompilerdirectives gochecksumtype goconst gocritic gocyclo gofmt goimports golint gosec gosimple gosmopolitan govet ineffassign loggercheck makezero misspell musttag nakedret nilerr noctx prealloc protogetter reassign rowserrcheck spancheck sqlclosecheck staticcheck testifylint unconvert unparam unused zerologlint]"
level=info msg="[lintersdb] Active presets: [bugs unused]"
level=info msg="[loader] Go packages loading at mode 575 (compiled_files|exports_file|imports|name|types_sizes|deps|files) took 32.356091014s"
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive."
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 11.565583ms"
level=info msg="[linters_context/goanalysis] analyzers took 3m27.289949583s with top 10 stages: buildir: 1m14.041348757s, goimports: 1m11.358363532s, buildssa: 18.754367116s, gocritic: 7.997533501s, fact_deprecated: 5.444047237s, inspect: 5.053023385s, exhaustive: 4.455594536s, ctrlflow: 3.67664383s, printf: 3.661249716s, nilness: 2.735253722s"
level=info msg="[runner] Issues before processing: 1019, after processing: 0"
level=info msg="[runner] Processors filtering stat (out/in): path_prettifier: 1019/1019, skip_dirs: 39/39, autogenerated_exclude: 39/39, exclude: 39/39, identifier_marker: 39/39, nolint: 0/16, cgo: 1019/1019, filename_unadjuster: 1019/1019, skip_files: 39/1019, exclude-rules: 16/39"
level=info msg="[runner] processing took 7.229796ms with stages: nolint: 3.266334ms, autogenerated_exclude: 1.389042ms, identifier_marker: 804µs, filename_unadjuster: 589.667µs, cgo: 433.459µs, skip_files: 244.251µs, path_prettifier: 242.583µs, exclude-rules: 209.167µs, skip_dirs: 47.833µs, max_same_issues: 834ns, severity-rules: 458ns, diff: 417ns, uniq_by_line: 375ns, fixer: 375ns, source_code: 208ns, path_prefixer: 167ns, sort_results: 167ns, exclude: 167ns, path_shortener: 125ns, max_from_linter: 125ns, max_per_file_from_linter: 42ns"
level=info msg="[runner] linters took 38.472752891s with stages: goanalysis_metalinter: 38.465446225s"
level=info msg="File cache stats: 78 entries of total size 831.5KiB"
level=info msg="Memory: 698 samples, avg is 1316.4MB, max is 2889.2MB"
level=info msg="Execution took 1m10.845190697s"

$ echo $?
0

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.

Please add "patches" parameter when using kustomize in provider-argocd
4 participants