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

Fix propagation of PVC feature flag across prebuild/regular workspaces #13117

Merged
merged 2 commits into from
Sep 22, 2022

Conversation

geropl
Copy link
Member

@geropl geropl commented Sep 20, 2022

Description

This ensures that:

  • prebuilds strictly follow the usePersistentVolumeClaim project setting
  • on workspace creation, persistent_volume_claim can be added (if user enabled that flag) but not removed (e.g. in case a prior instance had that feature-flag enabled)
  • during workspace restarts, the persistent_volume_claim stays untouched, e.g. is carried over from the workspace config

❓ Is that what we want to achieve? 🤔
Synced with @sagor999 : yes ✔️

Related Issue(s)

Fixes #12718

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@geropl geropl marked this pull request as ready for review September 20, 2022 17:15
@geropl geropl requested a review from a team September 20, 2022 17:15
@geropl geropl requested a review from sagor999 September 20, 2022 17:15
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 20, 2022
@sagor999
Copy link
Contributor

/hold
to ensure we (workspace) team can test this prior to merge

@sagor999
Copy link
Contributor

@geropl thank you for PR!!
@jenting would you be able to take a peek at this PR and verify it as well?

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-12718-pvc.4 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-12718-pvc.5 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-12718-pvc.6 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-12718-pvc.7 because the annotations in the pull request description changed
(with .werft/ from main)

@jenting jenting self-requested a review September 21, 2022 01:29
@jenting
Copy link
Contributor

jenting commented Sep 21, 2022

Hmmm... I started to test this scenario but failed

  • Project without PVC
    image
  • User A with PVC
    image
  • User B without PVC
    image
  1. User A creates a new branch X and pushes a commit
  2. The prebuild is built with PVC ❌ (which is wrong, since project does not have PVC enabled, so it took user's flag instead).
  3. The user B opens the prebuild with branch X, the workspace opens with PVC object ❌ (which is not correct, but due to failure at step 2.)

cc @geropl

@geropl
Copy link
Member Author

geropl commented Sep 21, 2022

Thank you @jenting , especially for the details, so I know what to look for. 🤔
Let me see if I find time to look into it today.

@jenting
Copy link
Contributor

jenting commented Sep 21, 2022

Thank you @jenting , especially for the details, so I know what to look for. 🤔 Let me see if I find time to look into it today.

Just for the heads up, I did not run the full PVC + prebuild test cases manually for this PR.
I plan to add more integration tests so we can verify it easily.

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-12718-pvc.9 because the annotations in the pull request description changed
(with .werft/ from main)

@sagor999
Copy link
Contributor

@jenting can you try again? ^

@jenting
Copy link
Contributor

jenting commented Sep 22, 2022

@jenting can you try again? ^

I am testing it now 😄

@jenting
Copy link
Contributor

jenting commented Sep 22, 2022

/werft run with-preview

👍 started the job as gitpod-build-gpl-12718-pvc.10
(with .werft/ from main)

@jenting
Copy link
Contributor

jenting commented Sep 22, 2022

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-gpl-12718-pvc.11
(with .werft/ from main)

@jenting
Copy link
Contributor

jenting commented Sep 22, 2022

I have verified all the cases, one case failed.

The prebuild project does not enable persistent_volume_claim, but user A enables persistent_volume_claim.
The prebuild project was built without a PVC object, this is good. 👍
User A opens the workspace from prebuild. The workspace does not open with a PVC object. This is wrong because the user enables persistent_volume_claim. ❌


Let me summarize the behavior we expected. cc @geropl

  • The prebuild project does not enable persistent_volume_claim. The prebuild pod runs without a PVC object.
    • The user opens the workspace from the prebuild project:
      • If the user with PVC, the workspace opens with a PVC object.
      • If the user is without PVC, the workspace opens without a PVC object.
  • The prebuild project enables persistent_volume_claim. The prebuild pod runs with a PVC object.
    • The user opens the workspace from the prebuild project:
      • If the user with PVC, the workspace opens with a PVC object.
      • If the user is without PVC, the workspace opens with a PVC object.

Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

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

All scenarios work like a charm, appreciate @geropl.

@geropl
Copy link
Member Author

geropl commented Sep 22, 2022

@jenting Thank for you diligent testing! 🙏 Would have loved to do that myself, but seem to be short on time 🙃

@geropl
Copy link
Member Author

geropl commented Sep 22, 2022

/hold

@geropl
Copy link
Member Author

geropl commented Sep 22, 2022

/unhold

@roboquat roboquat merged commit 9993ba6 into main Sep 22, 2022
@roboquat roboquat deleted the gpl/12718-pvc branch September 22, 2022 14:22
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PVC] Prebuild without PVC, user A account with PVC and trigger rebuild, user B account without PVC
5 participants