fix(watch): exclude Dockerfile and compose files from initial sync - #14117
Open
htoyoda18 wants to merge 1 commit into
Open
fix(watch): exclude Dockerfile and compose files from initial sync#14117htoyoda18 wants to merge 1 commit into
htoyoda18 wants to merge 1 commit into
Conversation
Signed-off-by: hiroto.toyoda <hiroto.toyoda@dena.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
initialSync's doc comment promises that the Dockerfile and compose files are never copied into the container duringdocker compose watch's initial sync — but the matcher enforcing that was dropped without replacement in a January 2025 refactor (#12469), leaving only a// FIXME .dockerignorecomment where it used to sit. Neither.dockerignore-derived ignores norEphemeralPathMatcher()(editor swap/temp files) cover this, so adevelop.watchtrigger whose path includes the project root would copyDockerfile/compose.yamlinto the running container on initial sync.Reintroduced a dedicated
dockerFileIgnorematcher (Dockerfile,*compose*.y*ml) insideinitialSync, matching the pre-refactor behavior.Scoped to
initialSynconly: the continuous watch loop's ignore (getWatchRules) never carried this exclusion, and — because it matches against full paths rather than basenames — would need a differently-anchored matcher to work there; that's a separate change if wanted.Related issue
N/A
(not mandatory) A picture of a cute animal, if possible in relation to what you did