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

workspace integration test: refactor TestBackup #12861

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

jenting
Copy link
Contributor

@jenting jenting commented Sep 12, 2022

Description

workspace integration test: refactor TestBackup.

  • Use the last status reports from the ws-manager rather than the volume snapshot client to find the VolumeSnapshot within the Kubernetes cluster.
  • Remove the volume snapshot client to prevent we encounter any error that we can't connect to the Kubernetes cluster either because the kube-apiserver is busy or the network is unreliable.

Related Issue(s)

Fixes #12497

How to test

cd test

go test  -run ^TestBackup$ github.com/gitpod-io/gitpod/test/tests/components/ws-manager -count=1 -namespace=default -kubeconfig=/home/gitpod/.kube/config -v -timeout=20m

Release Notes

None

Documentation

None

Werft options:

  • /werft with-preview

@jenting
Copy link
Contributor Author

jenting commented Sep 12, 2022

/werft run with-preview

👍 started the job as gitpod-build-jenting-refactor-testbackup.1
(with .werft/ from main)

@jenting jenting requested a review from a team September 12, 2022 08:34
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Sep 12, 2022
@jenting
Copy link
Contributor Author

jenting commented Sep 12, 2022

/werft run

👍 started the job as gitpod-build-jenting-refactor-testbackup.3
(with .werft/ from main)

@jenting jenting force-pushed the jenting/refactor-TestBackup branch from cc098bd to dfacdcb Compare September 12, 2022 10:58
@utam0k
Copy link
Contributor

utam0k commented Sep 12, 2022

@jenting I have never seen an error that relates to the volume snapshot client. May I ask you to give this error?

@jenting
Copy link
Contributor Author

jenting commented Sep 13, 2022

@jenting I have never seen an error that relates to the volume snapshot client. May I ask you to give this error?

Two points:

  • The first one is your comment PVC integration tests: TestBackup and TestRegularWorkspaceTasks and TestWorkspaceEnableAndDisablePVC #12620 (comment)
  • The second one is when I was working on adding the PVC test to TestBackup, I did not realize we could get the volume snapshot information after the workspace stopped. Therefore, I used the volume snapshot client to find the corresponding VolumeSnapshot object by label selector. However, it's not perfect because it's not how the server component finds the VolumeSnapshot information. The server component knows the VolumeSnapshot information after the ws-manager stops the workspace and notifies the workspace last information via the ws-manager-bridge.

@jenting jenting force-pushed the jenting/refactor-TestBackup branch 2 times, most recently from 7f8d3e3 to 8dce48a Compare September 13, 2022 00:50
@jenting jenting marked this pull request as ready for review September 13, 2022 00:57
@utam0k
Copy link
Contributor

utam0k commented Sep 13, 2022

@jenting May I ask you to organize the commits?

We should rely on the ws-manager last reported volume snapshot
information rather than use the volume snapshot client to find
the VolumeSnapshot object within the Kubernetes cluster.

This behavior is more close to how the ws-manager reports the last
volume snapshot information to server via ws-manager-bridge.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
@jenting jenting force-pushed the jenting/refactor-TestBackup branch from 8dce48a to 8ebb015 Compare September 13, 2022 01:11
@jenting
Copy link
Contributor Author

jenting commented Sep 13, 2022

@jenting May I ask you to organize the commits?

Done! PTAL.

@roboquat roboquat merged commit 73928d9 into main Sep 13, 2022
@roboquat roboquat deleted the jenting/refactor-TestBackup branch September 13, 2022 01:23
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/L team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[integration tests] add regular workspace PVC integration test from PVC test plans
3 participants