-
Notifications
You must be signed in to change notification settings - Fork 707
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
Add CI multicluster + OIDC environment #2619
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
721a679
Log wrong responses during the e2e tests
antgamdia b972339
Use pipeline params in CI. Add names to the steps
antgamdia 66676ee
Add multicluster w/ oidc inconditionally
antgamdia 1487874
Refactor login logic in e2e test using the envar
antgamdia 7b6e377
Fix typo
antgamdia 9a5ac98
Add missing import utils. Using imports
antgamdia 83836d8
Use same prettier configuration as in the dashboard
antgamdia 10e06b5
Use a more specific selector for the loading spinner
antgamdia e7049d6
Merge branch 'minor-dry-ci-fixes' into multicluster-ci
antgamdia 788381d
Use require instead of es6 imports
antgamdia 5f9c022
Use require instead of es6 imports
antgamdia 30686dc
Remove unnecessary waits for the spinner to disappear
antgamdia 03d3509
Merge branch 'master' into multicluster-ci
antgamdia 25d933a
Remove unnecessary class
antgamdia 2cbaa70
Add http redirect URI for CI purposes
antgamdia 22664e4
Remove 'document' from utils lib, use 'page' instead
antgamdia 80478e9
Fix wrong url
antgamdia f74443f
Ignore multicluster in gke
antgamdia 37350dd
Increase timeout
antgamdia fe581bb
Fix typos
antgamdia 9d67768
Better handling of envars
antgamdia 7cf84c0
Add PR comments. Remove unused timeouts. Increase global timeout.
antgamdia 830b574
Merge branch 'master' into multicluster-ci
antgamdia 743af54
Create kubeapps-user rbac during the cluster creation. Use OLM versio…
antgamdia 2dd82a2
Add flag to the kubeapps installation
antgamdia 1db5a59
Temporary removal of the upgrade test
antgamdia 23ea30c
Remove some flags. Edit timeout
antgamdia 7383fae
Add temporary manual deletion of some resources
antgamdia 026b29d
Add retry in k8s_wait_for_deployment
antgamdia c1656c2
Remove workaround
antgamdia 79fa463
Add wait
antgamdia 264d8a2
Add timeout to k8s_wait_for_deployment and remove sleep
antgamdia e6a1c1e
Increase wait until retry
antgamdia 2775a31
Add watch to k8s_wait_for_deployment
antgamdia af61649
Add temporary workaround
antgamdia 386f27a
Fix workaround
antgamdia 0044b68
Add postgresqlPassword
antgamdia 13bdad3
Add try/catch because of failing tests
antgamdia 732bb33
Add test sequencer
antgamdia 3320a08
Fix sequencer
antgamdia 7086d6f
Remove unnecessary workaround
antgamdia 3223042
Decrease sleep when retrying k8s_wait_for_deployment
antgamdia 12322e7
Rename test cases to explicitize the order
antgamdia a63c0e4
Remove try/catch after the release 2.3
antgamdia bd1c0a1
Change button selectors
antgamdia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
printWidth: 100, | ||
trailingComma: "all", | ||
arrowParens: "avoid", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const Sequencer = require("@jest/test-sequencer").default; | ||
|
||
class CustomSequencer extends Sequencer { | ||
sort(tests) { | ||
const copyTests = Array.from(tests); | ||
return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1)); | ||
} | ||
} | ||
|
||
module.exports = CustomSequencer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const utils = require("./lib/utils"); | ||
|
||
test("Deploys an application with the values by default", async () => { | ||
await utils.login( | ||
page, | ||
process.env.USE_MULTICLUSTER_OIDC_ENV, | ||
"/", | ||
"", | ||
"kubeapps-operator@example.com", | ||
"password", | ||
); | ||
|
||
// Change cluster using ui | ||
await expect(page).toClick(".kubeapps-nav-link"); | ||
|
||
await page.select('select[name="clusters"]', "second-cluster"); | ||
|
||
await expect(page).toClick("cds-button", { text: "Change Context" }); | ||
|
||
await expect(page).toClick("a", { text: "Catalog" }); | ||
|
||
await expect(page).toMatchElement("a", { text: "apache", timeout: 60000 }); | ||
await expect(page).toClick("a", { text: "apache" }); | ||
|
||
await expect(page).toClick("cds-button", { text: "Deploy" }); | ||
|
||
await expect(page).toClick("cds-button", { text: "Deploy" }); | ||
|
||
await expect(page).toMatch("Ready", { timeout: 60000 }); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Despite the tests use to be executed in alphabetical order, there is no actual guarantee of that. It was causing a failure in the multicluster test because the secret created in the secret-repo test wasn't being found.
This sequencer just ensures this alphabetical order (I've pushed the integration img with this dep as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are saying that creating a private repository causes an error in the multicluster scenario? (That sounds like a bug we should fix). If that's the case, can you open an issue for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't yet support app repos (let alone secret ones) on other clusters (#1982) because the interface to sync with the asset svc is via the DB (#2394) (left over from the read-only monocular).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification, I always forget about this issue.
Perhaps we should name the tests like "01-xxxx.js", "00-xxx.js" just to make clear that they are being executed in order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that private repositories are not supported in the second cluster but what I don't understand is why the order of the tests affects the result. I thought that creating a private repo in the default cluster caused an error when trying to deploy in the second cluster but that may not be it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, ok, I see your point now and it may be an issue as you said:
When creating a private repo first, we are creating the docker credentials. Somehow, when deploying in the second cluster, it tries to retrieve these credentials (not available, though), and fails, therefore.
Let me replicate the issue in my dev environment and will file an issue with the details.
However, with regards to this PR, I think (for the sake of replicability) to still define an explicit order during the test suite execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to reproduce this issue in my dev environment. I set up the multicluster env and: 1) tried to manually create the private repo and then a new deployment; 2) run the e2e test directly from
yarn start ...
.In both cases, the credentials are being properly stored and the app deploys seamlessly as well.
That's odd... :S
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably added a namespaced private repository. If you create it in the
kubeapps
namespace, you are likely able to reproduce the issue.