Skip to content

[Orgs] Persist slug #16923

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 4 commits into from
Mar 24, 2023
Merged

[Orgs] Persist slug #16923

merged 4 commits into from
Mar 24, 2023

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Mar 20, 2023

Description

This (re-)introduces persistence of Organization.slug.

New organizations will be given unique slugs. In case of conflicts, the slugified name attribute will be appended by a random string.

Org owners will be able to change the slug under Settings.

Screenshot 2023-03-21 at 10 41 05

Known follow-ups:

  • backfill slugs for relevant entries
  • display slug for non-owner of the organization
  • add slug field to New Organization screen

Related Issue(s)

Part of #16856

How to test

Release Notes

NONE

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /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-persist-slug.0 because the annotations in the pull request description changed
(with .werft/ from main)

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Mar 21, 2023

Just found another issue I'd like to tackle before setting to ready: when changing slug, it needs to get validated. ✔️

@AlexTugarev AlexTugarev marked this pull request as ready for review March 21, 2023 13:18
@AlexTugarev AlexTugarev requested a review from a team March 21, 2023 13:18
@AlexTugarev AlexTugarev requested a review from gtsiolis as a code owner March 21, 2023 13:18
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 21, 2023
@AlexTugarev
Copy link
Member Author

AlexTugarev commented Mar 22, 2023

/gh run recreate-vm

Comment triggered a workflow run

Started workflow run: 4488322389

  • recreate_vm: true

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Left a couple of UX comments below. 🏓

Thanks, @AlexTugarev! 🌮 🌮

Approving to unblock merging, holding to address the missing duplicate slug error and for someone to take a closer look at the code changes.

/hold

over-here

/>

<TextInputField
label="Slug"
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Thanks @AlexTugarev for using the new form components! Thanks also @selfcontained for initially adding[1] the htmlFor element.

@AlexTugarev AlexTugarev force-pushed the at/persist-slug branch 2 times, most recently from 92e75c4 to e4b28dd Compare March 22, 2023 16:23
@roboquat roboquat added size/XL and removed size/L labels Mar 23, 2023
@AlexTugarev AlexTugarev force-pushed the at/persist-slug branch 2 times, most recently from 6549295 to 5a2c5ad Compare March 23, 2023 11:32
creationTime: new Date().toISOString(),
};
await teamRepo.save(team);
let slug = slugify(name, { lower: true });
Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing we've ensured that the resulting slug from this function does actually conform to the regex which we're enforcing when doing the update.

@AlexTugarev
Copy link
Member Author

/gh run recreate-vm

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Mar 24, 2023

/gh run recreate-vm

Comment triggered a workflow run

Started workflow run: 4508570254

  • recreate_vm: true

@AlexTugarev
Copy link
Member Author

/hold cancel

We'll verify on gitpod-staging.com once more, as the preview env doesn't work anymore.

@roboquat roboquat merged commit 275e782 into main Mar 24, 2023
@roboquat roboquat deleted the at/persist-slug branch March 24, 2023 09:51
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Mar 24, 2023
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/L team: webapp Issue belongs to the WebApp team
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

7 participants