Skip to content

Notify on workspace creation/update #15845

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

Closed
bpmct opened this issue Dec 12, 2024 · 5 comments
Closed

Notify on workspace creation/update #15845

bpmct opened this issue Dec 12, 2024 · 5 comments
Assignees
Labels
customer-requested Features requested by enterprise customers. Only humans may set this.

Comments

@bpmct
Copy link
Member

bpmct commented Dec 12, 2024

Some customers want to create automations once a workspace has been created. By adding notification/websocket triggers for when a workspace has been created or updated, this is possible via a lambda.

Two Three notification types

  • Workspace Created
  • Workspace Manually Updated

Underlying metadata:

  • workspace name
  • owner
  • parameters (name and value)
  • template
  • template version
@coder-labeler coder-labeler bot added the needs-triage Issue that require triage label Dec 12, 2024
@bpmct bpmct added customer-requested Features requested by enterprise customers. Only humans may set this. and removed needs-triage Issue that require triage labels Dec 12, 2024
@stirby stirby changed the title (Websocket) notify on workspace creation/update Notify on workspace creation/update Dec 12, 2024
@bpmct
Copy link
Member Author

bpmct commented Dec 12, 2024

cc @mtojek

@bpmct bpmct changed the title Notify on workspace creation/update Notify on workspace creation/update/update Dec 12, 2024
@bpmct
Copy link
Member Author

bpmct commented Dec 12, 2024

@DanielleMaywood I also added "workspace update". where the workspace is edited, and perhaps parameters are changed. is this possible too?

@DanielleMaywood
Copy link
Contributor

@bpmct RE "workspace update": I think I have some queries.

What do we consider to be "updating" a workspace? There are a few different actions that can result in changes to a workspace's underlying data. Do we intentionally keep this scope very narrow? If so, that makes this much easier as there are fewer places where we need to trigger the notification.

DanielleMaywood added a commit that referenced this issue Jan 2, 2025
Relates to #15845

When the `/workspace/<name>/builds` endpoint is hit, we check if the
requested template version is different to the previously used template
version. If these values differ, we can assume that the workspace has
been manually updated and send the appropriate notification. Automatic
updates happen in the lifecycle executor and bypasses this endpoint
entirely.
@DanielleMaywood
Copy link
Contributor

@bpmct With #15934 and #15979 both merged, do you view this issue as completed?

@bpmct
Copy link
Member Author

bpmct commented Jan 2, 2025

Hey, apologies I missed your message 2 weeks ago. Yes, we can mark this one as completed 🎉

DanielleMaywood added a commit that referenced this issue Jan 15, 2025
…ly (#16071)

Relates to #15845

Rather than sending the notification to the user, we send it to the
template admins. We also do not send it to the person that created the
request.
@bpmct bpmct changed the title Notify on workspace creation/update/update Notify on workspace creation/update Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-requested Features requested by enterprise customers. Only humans may set this.
Projects
None yet
Development

No branches or pull requests

2 participants