-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: cron removed on module change #3512
Changes from all commits
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 |
---|---|---|
|
@@ -100,13 +100,18 @@ func Start(ctx context.Context, config Config, pullSchemaClient PullSchemaClient | |
newState.protoSchema.Modules = append(newState.protoSchema.Modules, resp.Schema) | ||
} | ||
} else if existing != nil { | ||
// We see the new state of the module before we see the removed deployment. | ||
// We only want to actually remove if it was not replaced by a new deployment. | ||
if !resp.ModuleRemoved { | ||
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. Yeah nice. |
||
logger.Debugf("Not removing ingress for %s as it is not the current deployment", resp.DeploymentKey) | ||
return nil | ||
} | ||
for i := range existing.Modules { | ||
if existing.Modules[i].Name != resp.ModuleName { | ||
newState.protoSchema.Modules = append(newState.protoSchema.Modules, existing.Modules[i]) | ||
} | ||
} | ||
} | ||
|
||
newState.httpRoutes = extractIngressRoutingEntries(newState.protoSchema) | ||
sch, err := schema.FromProto(newState.protoSchema) | ||
if err != nil { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Ah I see, that makes sense. Though if it's immediately ADDED, this shouldn't actually stop cron jobs from working as the ticket describes right?
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.
It is ADDED then REMOVED, so we first get a message with the new cron schema, then get a message that the old one is removed. With the code the way it currently is all the cron jobs after the first deployment basically get removed immediately.