Skip to content

fix: reduce cost of prebuild failure #17697

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 51 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
fcb3e5d
fix: limit prebuild failure cost
evgeniy-scherbina May 6, 2025
701e2a8
refactor: CR's fixes
evgeniy-scherbina May 12, 2025
0fdd096
refactor: CR's fixes
evgeniy-scherbina May 12, 2025
13c0e28
refactor: CR's fixes
evgeniy-scherbina May 12, 2025
29e9cff
refactor: CR's fixes
evgeniy-scherbina May 12, 2025
1d51dfc
Merge remote-tracking branch 'origin/main' into 17432-limit-prebuild-…
evgeniy-scherbina May 14, 2025
5c60065
feat: add notification for prebuilds failure
evgeniy-scherbina May 14, 2025
b0248c3
test: fix tests
evgeniy-scherbina May 15, 2025
08b18b0
test: add a notification test
evgeniy-scherbina May 15, 2025
0fd347a
fix: add prebuild_status migration
evgeniy-scherbina May 16, 2025
08981a4
generate.sh
evgeniy-scherbina May 16, 2025
0e4600c
fix: using prebuild status
evgeniy-scherbina May 16, 2025
107879b
fix: migrations numbers
evgeniy-scherbina May 16, 2025
2dea5ab
make gen
evgeniy-scherbina May 16, 2025
e252093
make gen/golden-files
evgeniy-scherbina May 16, 2025
906ceb9
fix: fix dbauthz
evgeniy-scherbina May 16, 2025
3a0284f
Merge remote-tracking branch 'origin/main' into 17432-limit-prebuild-…
evgeniy-scherbina May 16, 2025
13fb1af
fix: minor fix
evgeniy-scherbina May 16, 2025
108ea0a
test: fix tests
evgeniy-scherbina May 19, 2025
7cd2799
test: fix dbmem
evgeniy-scherbina May 19, 2025
f9148e2
make gen/golden-files
evgeniy-scherbina May 19, 2025
315acfa
Remove outdated TODOs
evgeniy-scherbina May 19, 2025
1679ac9
fix: enhance notification template
evgeniy-scherbina May 19, 2025
d9c9d17
Merge remote-tracking branch 'origin/main' into 17432-limit-prebuild-…
evgeniy-scherbina May 19, 2025
c47ddaa
make gen/golden-files
evgeniy-scherbina May 19, 2025
c19f28a
refactor: minor improvements
evgeniy-scherbina May 19, 2025
b18730f
fix: minor fix in template
evgeniy-scherbina May 19, 2025
37173b0
fix: minor improvement to template
evgeniy-scherbina May 19, 2025
0e3cc40
fix: minor fixes
evgeniy-scherbina May 19, 2025
784adba
fix: fix TODO
evgeniy-scherbina May 19, 2025
50bd9b4
refactor: CR's fixes
evgeniy-scherbina May 20, 2025
8a33ac8
refactor: CR's fixes
evgeniy-scherbina May 20, 2025
9439fa1
refactor: use not null for prebuild_status
evgeniy-scherbina May 20, 2025
e667dad
refactor: fix dbauthz test
evgeniy-scherbina May 20, 2025
8a51702
refactor: use healthy enum option instead of normal
evgeniy-scherbina May 20, 2025
a793e18
refactor: minor refactoring in tests
evgeniy-scherbina May 20, 2025
a0fb69c
refactor: rename DB method
evgeniy-scherbina May 20, 2025
c6f209c
refactor: make fmt
evgeniy-scherbina May 20, 2025
9dccf3e
refactor: make gen + reorder methods
evgeniy-scherbina May 20, 2025
c19ae04
refactor: make fmt
evgeniy-scherbina May 20, 2025
4b145cc
refactor: CR's fixes
evgeniy-scherbina May 20, 2025
80f3677
refactor: make gen
evgeniy-scherbina May 20, 2025
2144d13
refactor: CR's fixes
evgeniy-scherbina May 20, 2025
79725b3
refactor: CR's fixes
evgeniy-scherbina May 20, 2025
7e8b4b6
refactor: improve comments for test
evgeniy-scherbina May 20, 2025
ab5acfb
refactor: CR's fixes
evgeniy-scherbina May 20, 2025
7c09465
refactor: CR's fixes
evgeniy-scherbina May 21, 2025
b7a34c5
refactor: improve notification template
evgeniy-scherbina May 21, 2025
e1e141d
refactor: CR's fixes
evgeniy-scherbina May 21, 2025
354aeb4
refactor: CR's fixes
evgeniy-scherbina May 21, 2025
7564178
Merge remote-tracking branch 'origin/main' into 17432-limit-prebuild-…
evgeniy-scherbina May 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: minor fixes
  • Loading branch information
evgeniy-scherbina committed May 19, 2025
commit 0e3cc40d08ae549c1570e74e6c32b4a3a96c661e
2 changes: 1 addition & 1 deletion enterprise/coderd/prebuilds/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ func (c *StoreReconciler) notifyPrebuildFailureLimitReached(ctx context.Context,

// Send notification to template admins.
if c.notifEnq == nil {
c.logger.Warn(ctx, "notification enqueuer not set, cannot send resource replacement notification(s)")
c.logger.Warn(ctx, "notification enqueuer not set, cannot send prebuild is hard limited notification(s)")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion enterprise/coderd/prebuilds/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ func TestSkippingHardLimitedPresets(t *testing.T) {

// When hard limit is reached, a notification should be sent.
matching := fakeEnqueuer.Sent(func(notification *notificationstest.FakeNotification) bool {
if !assert.Equal(t, notification.TemplateID, notifications.PrebuildFailureLimitReached, "unexpected template") {
if !assert.Equal(t, notifications.PrebuildFailureLimitReached, notification.TemplateID, "unexpected template") {
return false
}

Expand Down
Loading