Skip to content

[werft] add with-dedicated-emulation switch #15587

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

Merged
merged 1 commit into from
Jan 17, 2023
Merged

[werft] add with-dedicated-emulation switch #15587

merged 1 commit into from
Jan 17, 2023

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Jan 5, 2023

Description

This adds the initial step towards a setup mode trigger. The motivation is to provide a way for iterative work on Dedicated setups.

How to test

Trigger a new build of a preview env using werft from within a workspace. GH integration doesn't use the same version of /workspace/gitpod/.werft/jobs/build/job-config.ts, thus it wont work with the /werft comment.

 $ werft run github -j .werft/build.yaml -a with-preview=true -a with-clean-slate-deployment=true -a with-dedicated-emulation=true

The custom build should not contain any auth providers, thus they'd need to be created in the app.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-at-setup-mode.21 because the annotations in the pull request description changed
(with .werft/ from main)

@gitpod-io gitpod-io deleted a comment from werft-gitpod-dev-com bot Jan 6, 2023
@gitpod-io gitpod-io deleted a comment from werft-gitpod-dev-com bot Jan 6, 2023
@gitpod-io gitpod-io deleted a comment from werft-gitpod-dev-com bot Jan 6, 2023
@AlexTugarev AlexTugarev marked this pull request as ready for review January 6, 2023 15:27
@AlexTugarev AlexTugarev requested a review from a team January 6, 2023 15:27
Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

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

Hey @AlexTugarev 👋 I'm a bit unclear about the direction this is going so I have a quick clarifying question before I can leave a proper review ☺️

I think what confuses me is that "with setup" will do "less setup" as it won't configure auth providers.

If this flag is used explicitly to handle cases related to Gitpod Dedicated, could we name it GITPOD_DEDICATED_ENABLED or something along those line to clearly communicate the intent?

If the intention is to have different "setup modes" - e.g. "dedicated" and "something else" and "another way of setting up things" - then I'd prefer we'd name the environment variable "GITPOD_SETUP_MODE" and then then agree on a set of value that can have (e.g. "standard", and "dedicated" to behind with)

Thanks!

@iQQBot
Copy link
Contributor

iQQBot commented Jan 12, 2023

I think what confuses me is that "with setup" will do "less setup" as it won't configure auth providers.

I think the setup means you need setup auth providers manual when you first connect this preview environment.

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Jan 17, 2023

@mads-hartmann, sorry for the late response 🙏🏻

This PR was a first step made towards a preview environment that would mimic Dedicated installations. The WebApp team is working on a tasks which require proper testing with environments that as as close as possible to fresh Dedicated cells. At the same time it would be great to have the usual turnarounds as with preview envs.

I hope that provides some motivation for this PRs.

The scope of this PR was quite limited as we were just discussing about the semantics of the special setup mode we wanted to switch on using this option. In the meantime we agreed on setting up a setup service account in a post-deploy step, see #15657.

So, to sum up, the plan is to provide a special mode of a preview environment that would allow us to iterate faster on Dedicated task:

  1. Provide with a switch for preview deployments to turn off the Git auth providers
  2. Include setup account (disabled by default)
  3. (setup mode = true) Enable the setup account

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Jan 17, 2023

Thanks for the discussion on that, @mads-hartmann! I'll change the flag to with-dedicated-emulation in order to express its purpose.

✔️ done

@AlexTugarev AlexTugarev changed the title [werft] add with-setup-mode switch [werft] add with-dedicated-emulation switch Jan 17, 2023
@AlexTugarev AlexTugarev marked this pull request as ready for review January 17, 2023 11:42
@AlexTugarev
Copy link
Member Author

AlexTugarev commented Jan 17, 2023

/werft run

👍 started the job as gitpod-build-at-setup-mode.24
(with .werft/ from main)

Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @AlexTugarev! I added the hold label just so I can approve before CI passes. Could to update our docs to also list this flag? 🧡

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Jan 17, 2023

/werft run

👍 started the job as gitpod-build-at-setup-mode.25
(with .werft/ from main)

@AlexTugarev
Copy link
Member Author

/hold cancel

@roboquat roboquat merged commit f5f1f35 into main Jan 17, 2023
@roboquat roboquat deleted the at/setup-mode branch January 17, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants