Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: notify on workspace creation#15934

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DanielleMaywood merged 6 commits intomainfromdm-notify-on-workspace-creation
Dec 20, 2024

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedDec 19, 2024
edited
Loading

Relates to#15845

This PR introduces notifications for when workspaces are created.

Each notification contains some metadata about the workspace that has been created. I've intentionally limited this information to just IDs and names, as we can always add more data if requested/desired.

Adding the new notification caused other unrelated tests to fail due to how they were checking for the right notification. I've updated these tests to use a new helper functionSentWithTemplateID to hopefully reduce the likelihood of further notifications to cause a cascade of test failures.

@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewDecember 19, 2024 21:31
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

LGTM, some suggestions below but nothing blocking:

  • Regarding yourcoderd tests, it's good practice to "drop privileges" by creating a separate user with the minimum permission set for the behaviour you want to test, and testing with that user. This will catch RBAC-related bugs.
  • As it's also possible to create workspaces on behalf of other users, we should also test the behaviour in this workflow.

Copy link
Member

Choose a reason for hiding this comment

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

Obligatory prod to double-check migration number before merging :-)

Comment on lines +118 to +121
funcWithTemplateID(id uuid.UUID)func(*FakeNotification)bool {
returnfunc(n*FakeNotification)bool {
returnn.TemplateID==id
}
Copy link
Member

Choose a reason for hiding this comment

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

Nice :-)

@DanielleMaywoodDanielleMaywood merged commitf0e81ab intomainDec 20, 2024
30 checks passed
@DanielleMaywoodDanielleMaywood deleted the dm-notify-on-workspace-creation branchDecember 20, 2024 13:53
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsDec 20, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@mafredrimafredriAwaiting requested review from mafredri

@bpmctbpmctAwaiting requested review from bpmct

Assignees

@DanielleMaywoodDanielleMaywood

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@DanielleMaywood@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp