-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 self-hosted upgrade tests #10485
Conversation
/werft run --no-preview --with-upgrade-tests --from-version="2022.4.2" 👍 started the job as gitpod-build-nvn-upgrade-test.5 |
227f94f
to
f042e5c
Compare
/werft run --no-preview --with-upgrade-tests --from-version "2022.4.2" 👍 started the job as gitpod-build-nvn-upgrade-test.6 |
/werft run no-preview with-upgrade-tests from-version="2022.4.2" 👍 started the job as gitpod-build-nvn-upgrade-test.7 |
/werft run no-preview with-upgrade-tests 👍 started the job as gitpod-build-nvn-upgrade-test.8 |
/werft run no-preview with-upgrade-tests 👍 started the job as gitpod-build-nvn-upgrade-test.10 |
58803a7
to
bd31275
Compare
f042e5c
to
5d02eed
Compare
a58ef8c
to
94e835a
Compare
46ff721
to
562285c
Compare
started the job as gitpod-build-nvn-upgrade-test.39 because the annotations in the pull request description changed |
started the job as gitpod-build-nvn-upgrade-test.41 because the annotations in the pull request description changed |
started the job as gitpod-build-nvn-upgrade-test.43 because the annotations in the pull request description changed |
8ef4ae3
to
1f86985
Compare
started the job as gitpod-build-nvn-upgrade-test.52 because the annotations in the pull request description changed |
16c25a9
to
ed97560
Compare
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'm a bit new to typescript so some of my comments may be borne from that lack of experience. As a whole this looks good 👍 but I'd like to get a better understanding of the code to aid my comprehension.
ed97560
to
5cba389
Compare
5cba389
to
e95fc6f
Compare
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.
Added comments with some general thoughts, none of which are blockers. LGTM! 🚢
@@ -63,7 +81,25 @@ pod: | |||
(cd .werft && yarn install && mv node_modules ..) | werft log slice prep | |||
printf '{{ toJson . }}' > context.json | |||
|
|||
npx ts-node .werft/installer-tests.ts "STANDARD_K3S_TEST" | |||
export DESTROY="{{ .Annotations.destroy }}" |
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.
Suggestion - would it make sense to simply pass all annotations to installer-tests.ts
and pick apart annotations in that file? We'll keep test setup a little bit simpler and coalesced in one location.
Non-blocker, we can address this in a future PR if desired.
@@ -46,6 +59,11 @@ pod: | |||
valueFrom: | |||
fieldRef: | |||
fieldPath: spec.nodeName | |||
- name: USER_TOKEN # this is for the integration tests |
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.
Note: this environment variable is looked up within the IDE and Workspace integration tests; we're providing it here for persistence between tests.
export async function triggerUpgradeTests(werft: Werft, config: JobConfig, username: string) { | ||
werft.phase(phases.TRIGGER_UPGRADE_TESTS, "Trigger upgrade tests on self-hosted gitpod"); | ||
|
||
if (!config.withUpgradeTests || !config.fromVersion) { |
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.
Opinion (non-blocker): At present the fromVersion
value is required in the upgrade test definition, so this should never be reachable. If config.withUpgradeTests
is true but config.fromVersion
is not set then we're likely in a condition where the test configuration itself is incorrect. In this case it might be more clear to the user if we log an error about this misconfiguration and abort, rather than skip the upgrade. WDYT?
CHANNEL="beta" | ||
fi | ||
|
||
npx ts-node .werft/installer-tests.ts "STANDARD_GKE_UPGRADE_TEST" ${FROM_VERSION} ${CHANNEL} |
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.
This is another case where we're unpacking annotations within a bash script before calling .werft/installer-tests.ts
. Would this also benefit from putting the annotation parsing into installer-tests.ts
?
Description
This PR adds a new werft flag to test the upgrade of gitpod self-hosted from one version to the latest. This is intended to be used in a release PR, to see how the upgrade would work from the previous version(we can specify the version) to the latest. The setup uses the
beta
channel of replicated, since this is where the release ends up before going to the stable channel according to our workflow. To run the test you can add the following comment to the PR:The above comment will creates a GKE cluster, install
20224.2
version of Gitpod, makes sure it is up and running, upgrades the Gitpod version to latest and confirm it has the basic functioning. This is the first 🛹 , we will add the integration tests and support for different cloud providers as the second iteration.Apologies for the lint fixes.
Related Issue(s)
Fixes #
How to test
To test this functionality you can open a workspace from this PR and run the following command once you make sure you have
core-dev
access:werft run github -j .werft/build.yaml -a no-preview=true -a with-upgrade-tests=true -a fromVersion="2022.5.0"
Release Notes
Documentation