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: Add cli support for additional linux based architectures, s390x + ppc64le #8991

Merged
merged 5 commits into from
May 6, 2022

Conversation

davidkarlsen
Copy link
Contributor

@davidkarlsen davidkarlsen commented Apr 4, 2022

While AIX isn't a very popular platform these days, it would be valuable for some legacy platforms to be able to integrate with argo-cd via the CLI in order to die in a nice way :)

Signed-off-by: David J. M. Karlsen david@davidkarlsen.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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).
  • 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.
  • Optional. My organization is added to USERS.md.
  • 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).

@davidkarlsen davidkarlsen changed the title Add support for AIX on ppc Add cli support for AIX on ppc Apr 4, 2022
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
@davidkarlsen davidkarlsen marked this pull request as ready for review April 4, 2022 18:19
Makefile Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #8991 (0944e26) into master (a2b7798) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #8991      +/-   ##
==========================================
- Coverage   46.06%   46.04%   -0.02%     
==========================================
  Files         217      217              
  Lines       25912    25912              
==========================================
- Hits        11936    11931       -5     
- Misses      12319    12323       +4     
- Partials     1657     1658       +1     
Impacted Files Coverage Δ
applicationset/services/scm_provider/github.go 75.29% <0.00%> (-5.89%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2b7798...0944e26. Read the comment docs.

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
@davidkarlsen davidkarlsen changed the title Add cli support for AIX on ppc Add cli support for additional architectures and aix Apr 4, 2022
Copy link

@krishvoor krishvoor 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 changes, lgtm!

@krishvoor
Copy link

Minor nitpick:
Looks like Semantic Pull Request is throwing a red-flag

Can you update your PR Title - something similar to this like
chore: Add cli support for additional architectures and aix

@davidkarlsen davidkarlsen changed the title Add cli support for additional architectures and aix feat: Add cli support for additional architectures and aix Apr 5, 2022
@davidkarlsen
Copy link
Contributor Author

@krishvoor fixed

@krishvoor
Copy link

Hi @rishabh625 - can you review it?

Copy link
Member

@rishabh625 rishabh625 left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidkarlsen
Copy link
Contributor Author

Hmm, CI does not actually build that steps it seems.
It fails when I:

make BIN_NAME=argocd-aix-ppc64 GOOS=aix GOARCH=ppc64 argocd-all
find /Users/et2448/projects/ext/github.com/argo-cd -name debug.test | xargs rm -f
CGO_ENABLED=0 GOOS=aix GOARCH=ppc64 go build -v -ldflags '-X github.com/argoproj/argo-cd/v2/common.version=2.4.0 -X github.com/argoproj/argo-cd/v2/common.buildDate=2022-04-05T20:47:18Z -X github.com/argoproj/argo-cd/v2/common.gitCommit=f8c4d217615efee278b9e32f1f5dd5e0d3b3d9ee -X github.com/argoproj/argo-cd/v2/common.gitTreeState=clean -X github.com/argoproj/argo-cd/v2/common.kubectlVersion=v0.23.1 -extldflags "-static"' -o /Users/et2448/projects/ext/github.com/argo-cd/dist/argocd-aix-ppc64 ./cmd
package github.com/argoproj/argo-cd/v2/cmd
        imports github.com/argoproj/argo-cd/v2/cmd/argocd-application-controller/commands
        imports github.com/argoproj/pkg/stats: build constraints exclude all Go files in /Users/et2448/go/pkg/mod/github.com/argoproj/pkg@v0.11.1-0.20211203175135-36c59d8fafe0/stats
make: *** [argocd-all] Error 1

locally

I guess not all packages can be cross-compiled

@krishvoor
Copy link

Right, CI might need QEMU Emulation to get it working..
Also, we have a patch for ppc64le/s390x for build-time/test dependencies here

@davidkarlsen
Copy link
Contributor Author

Right, CI might need QEMU Emulation to get it working.. Also, we have a patch for ppc64le/s390x for build-time/test dependencies here

I guess it would be good to build all architectures in CI, so one does not get a surprise at release-time.

@34fathombelow
Copy link
Member

Hmm, CI does not actually build that steps it seems. It fails when I:

make BIN_NAME=argocd-aix-ppc64 GOOS=aix GOARCH=ppc64 argocd-all
find /Users/et2448/projects/ext/github.com/argo-cd -name debug.test | xargs rm -f
CGO_ENABLED=0 GOOS=aix GOARCH=ppc64 go build -v -ldflags '-X github.com/argoproj/argo-cd/v2/common.version=2.4.0 -X github.com/argoproj/argo-cd/v2/common.buildDate=2022-04-05T20:47:18Z -X github.com/argoproj/argo-cd/v2/common.gitCommit=f8c4d217615efee278b9e32f1f5dd5e0d3b3d9ee -X github.com/argoproj/argo-cd/v2/common.gitTreeState=clean -X github.com/argoproj/argo-cd/v2/common.kubectlVersion=v0.23.1 -extldflags "-static"' -o /Users/et2448/projects/ext/github.com/argo-cd/dist/argocd-aix-ppc64 ./cmd
package github.com/argoproj/argo-cd/v2/cmd
        imports github.com/argoproj/argo-cd/v2/cmd/argocd-application-controller/commands
        imports github.com/argoproj/pkg/stats: build constraints exclude all Go files in /Users/et2448/go/pkg/mod/github.com/argoproj/pkg@v0.11.1-0.20211203175135-36c59d8fafe0/stats
make: *** [argocd-all] Error 1

locally

I guess not all packages can be cross-compiled

I also get the same error running this locally in Linux with QEMU. This would definitely cause a release to fail. @davidkarlsen Would you consider removing make BIN_NAME=argocd-aix-ppc64 GOOS=aix GOARCH=ppc64 argocd-all? The other additions would be really helpful since 2.4 will have support for ppc64le & s390x.

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
@davidkarlsen
Copy link
Contributor Author

@34fathombelow fixed

@34fathombelow
Copy link
Member

@davidkarlsen lgtm! If you don't mind changing the title of the PR to reflect only the architectures added.

@davidkarlsen davidkarlsen changed the title feat: Add cli support for additional architectures and aix feat: Add cli support for additional linux based architectures, s390x + ppc64le May 5, 2022
Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

lgtm. @alexmt any objections?

@alexmt alexmt enabled auto-merge (squash) May 6, 2022 21:43
@alexmt alexmt merged commit a3a4297 into argoproj:master May 6, 2022
alexmt added a commit that referenced this pull request May 6, 2022
… + ppc64le (#8991)

feat: Add cli support for additional linux based architectures, s390x + ppc64le (#8991)

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>

* add more architectures for linux

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>

* drop aix arch as it won't compile

Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
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.

6 participants