Skip to content
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

Merged
merged 3 commits into from
Apr 1, 2020

Conversation

thsig
Copy link
Collaborator

@thsig thsig commented Mar 31, 2020

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 a container module as a sourceModule) 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.

})
)

const serviceNamesForModule = [...module.serviceNames, ...dependantSourceModuleServiceNames]
Copy link
Collaborator

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?

Copy link
Collaborator Author

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?

Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

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!

thsig added 3 commits April 1, 2020 15:31
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.
@thsig thsig force-pushed the sourcemodule-hot-reload-fix branch from 7958d12 to ac34f2c Compare April 1, 2020 13:45
@edvald edvald merged commit 1f189bb into master Apr 1, 2020
@thsig thsig deleted the sourcemodule-hot-reload-fix branch April 2, 2020 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants