Skip to content

feat: notify on successful autoupdate - #13903

Merged
mtojek merged 10 commits into
mainfrom
7-auto-update
Jul 18, 2024
Merged

feat: notify on successful autoupdate#13903
mtojek merged 10 commits into
mainfrom
7-auto-update

Conversation

@mtojek

@mtojek mtojek commented Jul 16, 2024

Copy link
Copy Markdown
Member

Related: #13891

This PR implements notifications on workspace autoupdate.

Comment:
I took inspiration from Bruno's PR, and exposed the FakeNotificationsEnqueuer as a separate package.

@mtojek mtojek self-assigned this Jul 16, 2024
@mtojek
mtojek requested a review from dannykopping July 16, 2024 15:30
@mtojek
mtojek marked this pull request as ready for review July 16, 2024 15:30
@mtojek
mtojek requested a review from BrunoQuaresma July 17, 2024 10:14
Comment thread coderd/autobuild/lifecycle_executor.go
Comment thread coderd/coderdtest/coderdtest.go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the other PR, we did this a bit differently. We added this fake helper into the testutils package. Link to PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I'm aware of it. This is an alternative approach, and I'm happy to leave it or switch to the other form. @dannykopping any preference?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I prefer names which are explicit and clear, so I prefer testutils TBH.

@mtojek mtojek Jul 18, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will wait with merging this PR until Bruno merges #13868, then adjust it.

@BrunoQuaresma BrunoQuaresma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall, the code looks good to me, but I would wait for @dannykopping review since he is leading the work on this feature.

@dannykopping dannykopping left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Comment thread coderd/autobuild/lifecycle_executor.go Outdated
Comment thread coderd/autobuild/lifecycle_executor.go Outdated
@@ -0,0 +1,37 @@
package notiffake

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: I like splitting this out but I think the name is too "cute".
I think something like testutil or something would be more idiomatic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alright, I decided to merge it as is, and refactor/unify once #13868 is merged.

@mtojek
mtojek merged commit fbd1d7f into main Jul 18, 2024
@mtojek
mtojek deleted the 7-auto-update branch July 18, 2024 13:19
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants