-
Notifications
You must be signed in to change notification settings - Fork 273
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(core): fix watch task logic for sourceModules #1756
Conversation
garden-service/src/tasks/helpers.ts
Outdated
}) | ||
) | ||
|
||
const serviceNamesForModule = [...module.serviceNames, ...dependantSourceModuleServiceNames] |
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.
Is this correct? Should we count the services from a source module along with the services for this module?
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.
The context here is "services for which module
has the sources" (which are module
's services, and services that have module
as their sourceModule
). Or am I missing something?
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.
Maybe the variable name should be serviceNamesUsingModule
?
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, I had this backwards. Yeah I guess the name is a little confusing, but I think this just needs a comment to explain what's going on.
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.
Ok, cool. I've renamed the variable—the long comment above was supposed to explain the rationale here, do you think this still needs additional clarification?
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.
No this is good. Approved and merged!
Before this fix, if a service with a sourceModule was deployed with hot reloading enabled, a build task for its source module would be added when its sources change (in addition to the hot reload task). This was not the desired behavior, and would (e.g. for helm modules using a container module as a sourceModule) result in unnecessary rebuilds of the source module.
7958d12
to
ac34f2c
Compare
What this PR does / why we need it:
Before this fix, if a service with a
sourceModule
was deployed with hot reloading enabled, a build task for its source module would be added when its sources change (in addition to the hot reload task).This was not the desired behavior, and would (e.g. for
helm
modules using acontainer
module as asourceModule
) result in unnecessary rebuilds of the source module.Which issue(s) this PR fixes:
This issue was reported by a user on our community Slack.