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

chore: Make e2e tests runnable against remote cluster #5895

Merged
merged 7 commits into from
Apr 7, 2021

Conversation

jannfis
Copy link
Member

@jannfis jannfis commented Mar 29, 2021

This allows for running the end-to-end test suite against a real workload, deployed to a Kubernetes cluster.

Refer to the README.md for a more detailed explanation.

Signed-off-by: jannfis [email protected]

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).

@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #5895 (48da4ec) into master (1bc3348) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5895      +/-   ##
==========================================
+ Coverage   40.91%   40.95%   +0.04%     
==========================================
  Files         147      147              
  Lines       19635    19656      +21     
==========================================
+ Hits         8033     8051      +18     
- Misses      10497    10499       +2     
- Partials     1105     1106       +1     
Impacted Files Coverage Δ
cmd/argocd-util/commands/app.go 31.57% <0.00%> (-0.14%) ⬇️
util/kube/portforwarder.go 0.00% <0.00%> (ø)
cmd/argocd-util/commands/cluster.go 0.00% <0.00%> (ø)
util/settings/settings.go 41.46% <0.00%> (+1.52%) ⬆️

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 1bc3348...48da4ec. Read the comment docs.

@jannfis jannfis marked this pull request as ready for review March 29, 2021 11:13
@jannfis jannfis requested a review from alexmt March 29, 2021 11:14
@sbose78
Copy link
Contributor

sbose78 commented Mar 30, 2021

Thank you!

Copy link
Contributor

@sbose78 sbose78 left a comment

Choose a reason for hiding this comment

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

Will review further, but this work looks very sophisticated :)

test/e2e/fixture/certs/certs.go Show resolved Hide resolved
test/e2e/fixture/certs/certs.go Show resolved Hide resolved
test/remote/Dockerfile Show resolved Hide resolved
test/remote/README.md Show resolved Hide resolved
test/remote/README.md Show resolved Hide resolved
test/remote/README.md Outdated Show resolved Hide resolved
test/remote/README.md Outdated Show resolved Hide resolved
test/remote/generate-permissions.sh Show resolved Hide resolved
util/git/client.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

Awesome work @jannfis . Added couple comments about using personal docker repo name.

test/remote/manifests/kustomization.yaml Outdated Show resolved Hide resolved
test/remote/manifests/e2e-repositories.yaml Outdated Show resolved Hide resolved
@alexmt
Copy link
Collaborator

alexmt commented Apr 5, 2021

I'm sure this PR required a lot of effort. I think we should try to use it a much as we can to take advantage of it.

May be run every night agains https://cd.apps.argoproj.io/

@sbose78 , @jannfis do you plan to run it internally as well?

@sbose78
Copy link
Contributor

sbose78 commented Apr 5, 2021

May be run every night agains https://cd.apps.argoproj.io/

+1 we should do this. Does this get deployed nightly ?

do you plan to run it internally as well?

@alexmt Not internally per se, rather use existing automation ( OpenShift CI ) for spinning up multi-node clusters on AWS with ease to test https://github.com/argoproj/argo-cd with public test logs ( example ).

Generally speaking, the goal of running e2e tests against a deployed instance of Argo CD is :

  • Remove the need for manual testing prior to an Argo CD release
  • Run this on merge-to-master ( and eventually make it a PR ) in an openshift-agnostic way.
  • In the mid-term, the aim is to organize tests in such a way that their successful execution gives us a high-level of confidence 'as a user'.

Initially, this is what we plan on doing:

  1. Build https://github.com/argoproj/argo-cd/ master ( or use an existing built image )
  2. Deploy a multi-node OpenShift on AWS
  3. Deploy the freshly baked ArgoCD on OpenShift
  4. Run e2e tests against the live instance.

All logs would be public therefore we should be able to catch failures and log bugs against them on this repository early on and potentially fix them.

Note,

I think we should try to use it a much as we can to take advantage of it.

+1

  • Once this process is stable enough, I would propose (1) to (4) to be done on every merge-to-master on https://github.com/argoproj/argo-cd/. Given that this would be an additional webhook to Argo CD repository, this would have to go through the enhancement proposal process.
  • No downstream-specific concepts would leak into the tests.

@jannfis
Copy link
Member Author

jannfis commented Apr 6, 2021

Thanks for review @sbose78 and @alexmt

I have addressed all your comments, PTAL.

Signed-off-by: jannfis <[email protected]>
util/gpg/gpg.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM.

Just one more comment #5895 (comment) Please feel free to merge after resolving it.

Signed-off-by: jannfis <[email protected]>
@jannfis jannfis merged commit 9afa833 into argoproj:master Apr 7, 2021
yujunz added a commit to abcue/argo-cd that referenced this pull request Apr 15, 2021
5bc7297 fix: bitbucket server failing diagnostics:ping (argoproj#6029) (argoproj#6034)
8f53bd5 fix: add helm dependencies with custom CA (argoproj#6003)
8fd6f13 docs: Custom resource actions (argoproj#5838)
8a2897d docs: update delete policy verbiage (argoproj#6025)
c847bd9 chore: remove Argo CD CRDs from namespaced install (argoproj#6022)
61080b3 docs: improve Orphaned Resources Monitoring with more examples and correct grammar (argoproj#6006)
8301d39 Adding explicit bind to redis and sentinel for IPv4 clusters argoproj#5957 (argoproj#6005)
12cabdf fix: adding tests for helm OCI registry (argoproj#5978)
9da9514 docs: Add Ant Group to the list of users (argoproj#6011)
5e34a8a add Polarpoint.io (argoproj#6010)
2f92777 chore: move access checks from api server to repo server (argoproj#5940)
ae2d0ff fix(ui): Unscheduled pods in node view are now visible. Fixes argoproj#5981 (argoproj#5988)
b003f70 docs: SealedSecret status missing on k8s 1.16+ (argoproj#5846)
445872f fix: use correct field for evaluating whether or not GitHub Enterprise is selected (argoproj#5987)
9afa833 chore: Make e2e tests runnable against remote cluster (argoproj#5895)
shubhamagarwal19 pushed a commit to shubhamagarwal19/argo-cd that referenced this pull request Apr 15, 2021
* chore: Make e2e tests runnable against remote cluster

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

* Fix linter complaint

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

* Revert

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

* Address reviewer comments

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

* Compat with Mac

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

* Revert test setting

Signed-off-by: jannfis <[email protected]>
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.

3 participants