-
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(vcs): garden.yml changes now only affect relevant module version #1009
Conversation
723eb42
to
dbdf989
Compare
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.
Had a few questions. Also, if you have multiple modules in the same garden.yml
, they should all be re-built on changes to that garden.yml
, right?
@@ -148,6 +148,7 @@ export interface ModuleConfig | |||
|
|||
outputs: PrimitiveMap | |||
path: string | |||
configPath?: string |
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.
Why is this optional?
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.
Because we don't always have a config file, e.g. when plugins specify modules.
@@ -96,6 +96,7 @@ export interface ProjectConfig { | |||
kind: "Project", | |||
name: string | |||
path: string | |||
configPath?: string |
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.
Same as above, shouldn't the config path be required?
@@ -106,23 +106,25 @@ export class Watcher { | |||
return (path: string) => { | |||
this.log.debug(`Watcher: File ${path} ${type}`) | |||
|
|||
const changedModules = modules.filter(m => m.version.files.includes(path)) | |||
const changedModules = modules | |||
.filter(m => m.version.files.includes(path) || m.configPath === path) |
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.
We're filtering on the configPath
in at least three places. Should there be a generic function for this? Also feels like the type of thing one might forget.
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.
Each filter clause is different, so I can't see how we'd make it more generic. And re: forgetting—that's what the tests are for .)
All modules get re-built on changes to garden.yml
Looking into it |
Previously we were explicitly including the module config file in the module version file list. Now we ensure that it is _not_ included, which is the intended behavior after we started hashing the actual module config as part of the module version.
b879b98
to
b8b8e99
Compare
Previously we were explicitly including the module config file in the
module version file list. Now we ensure that it is not included,
which is the intended behavior after we started hashing the actual
module config as part of the module version.