-
Notifications
You must be signed in to change notification settings - Fork 6
Sync with Upstream Latest #78
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
base: next
Are you sure you want to change the base?
Changes from all commits
b1d41ce
19c60ea
8262d0a
2c6de87
1e18d90
d81beb3
7781d64
d0ad35e
08a6300
a7e990c
c122380
0f1edd0
a0cdadb
c588d79
921b0d3
430a8a7
81fc902
9cc824f
47586cd
1a7eb31
4da6070
c004f2d
d0934b2
e706647
6e15beb
4d3c023
c878bbf
5402ac7
01f848e
c305a80
5a0e81e
575aed0
bdee4da
4103e3f
ce6e76a
eb401aa
b0e54ca
e9bc2c3
71bbd56
985d5c3
80daa2d
8f7e4bb
95003aa
26f6310
8c3f0c6
c3c95e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v2.14.0 | ||
| v2.15.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /* | ||
| Initialize skip_audit_log_database configuration based on existing audit log usage - Only insert the configuration if it doesn't already exist | ||
| 1. If tables exist and show evidence of previous usage | ||
| set skip_audit_log_database to false | ||
| 2. If tables exist but show no evidence of usage, don't create the configuration record | ||
| */ | ||
| DO $$ | ||
| BEGIN | ||
| IF EXISTS (SELECT 1 FROM properties WHERE k = 'skip_audit_log_database') THEN | ||
| RETURN; | ||
| END IF; | ||
|
|
||
| IF (SELECT last_value FROM audit_log_id_seq) > 1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This condition only checks whether the sequences have advanced past 1, so an instance with exactly one audit log record ( Prompt for AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The migration determines prior audit-log usage via Prompt for AI agents |
||
| OR (SELECT last_value FROM audit_log_ext_id_seq) > 1 THEN | ||
| INSERT INTO properties (k, v) VALUES ('skip_audit_log_database', 'false'); | ||
| END IF; | ||
| END $$; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,7 @@ | |
| func (c *controller) Start(ctx context.Context, policy Policy, trigger string) (int64, error) { | ||
| para := make(map[string]any) | ||
| para["delete_untagged"] = policy.DeleteUntagged | ||
| para["delete_tag"] = policy.DeleteTag | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Setting Prompt for AI agents |
||
| para["dry_run"] = policy.DryRun | ||
| para["workers"] = policy.Workers | ||
| para["redis_url_reg"] = policy.ExtraAttrs["redis_url_reg"] | ||
|
|
@@ -127,7 +128,7 @@ | |
| } | ||
|
|
||
| // GetExecution ... | ||
| func (c *controller) GetExecution(ctx context.Context, id int64) (*Execution, error) { | ||
|
Check warning on line 131 in src/controller/gc/controller.go
|
||
| execs, err := c.exeMgr.List(ctx, &q.Query{ | ||
| Keywords: map[string]any{ | ||
| "ID": id, | ||
|
|
@@ -178,7 +179,7 @@ | |
| } | ||
|
|
||
| // GetTaskLog ... | ||
| func (c *controller) GetTaskLog(ctx context.Context, id int64) ([]byte, error) { | ||
|
Check warning on line 182 in src/controller/gc/controller.go
|
||
| _, err := c.GetTask(ctx, id) | ||
| if err != nil { | ||
| return nil, err | ||
|
|
@@ -187,7 +188,7 @@ | |
| } | ||
|
|
||
| // GetSchedule ... | ||
| func (c *controller) GetSchedule(ctx context.Context) (*scheduler.Schedule, error) { | ||
|
Check warning on line 191 in src/controller/gc/controller.go
|
||
| sch, err := c.schedulerMgr.ListSchedules(ctx, q.New(q.KeyWords{"VendorType": job.GarbageCollectionVendorType})) | ||
| if err != nil { | ||
| return nil, err | ||
|
|
@@ -205,6 +206,7 @@ | |
| func (c *controller) CreateSchedule(ctx context.Context, cronType, cron string, policy Policy) (int64, error) { | ||
| extras := make(map[string]any) | ||
| extras["delete_untagged"] = policy.DeleteUntagged | ||
| extras["delete_tag"] = policy.DeleteTag | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Writing Prompt for AI agents |
||
| extras["workers"] = policy.Workers | ||
| return c.schedulerMgr.Schedule(ctx, job.GarbageCollectionVendorType, -1, cronType, cron, job.GarbageCollectionVendorType, policy, extras) | ||
| } | ||
|
|
@@ -234,6 +236,7 @@ | |
| StatusMessage: task.StatusMessage, | ||
| RunCount: task.RunCount, | ||
| DeleteUntagged: task.GetBoolFromExtraAttrs("delete_untagged"), | ||
| DeleteTag: task.GetBoolFromExtraAttrs("delete_tag"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reading Prompt for AI agents |
||
| DryRun: task.GetBoolFromExtraAttrs("dry_run"), | ||
| Workers: int(task.GetNumFromExtraAttrs("workers")), | ||
| JobID: task.JobID, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ import ( | |
| type Policy struct { | ||
| Trigger *Trigger `json:"trigger"` | ||
| DeleteUntagged bool `json:"deleteuntagged"` | ||
| DeleteTag bool `json:"deletetag"` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Introducing DeleteTag as a plain bool makes existing policies default to false when this field is absent, so legacy garbage-collection policies will now skip tag deletion even though the feature is supposed to remain enabled by default. Use a pointer or explicit defaulting to preserve the intended behaviour for existing data. Prompt for AI agents |
||
| DryRun bool `json:"dryrun"` | ||
| Workers int `json:"workers"` | ||
| ExtraAttrs map[string]any `json:"extra_attrs"` | ||
|
|
@@ -60,6 +61,7 @@ type Task struct { | |
| StatusMessage string | ||
| RunCount int32 | ||
| DeleteUntagged bool | ||
| DeleteTag bool | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same defaulting issue as in Policy: Task.DeleteTag is now false when deserializing historical tasks lacking this field, causing garbage-collection runs spawned from old executions to skip tag deletion unexpectedly. Ensure the field defaults to true when missing. Prompt for AI agents |
||
| DryRun bool | ||
| Workers int | ||
| JobID string | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin the actions/stale step to the immutable commit for v10.0.0 instead of a mutable tag so the workflow can’t run altered code if the tag gets retargeted.
Prompt for AI agents