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

source: context: Optimize fetch by path #352

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

cpuguy83
Copy link
Member

This makes sure that if a path is specified on a context source that we we only ever fetch the content from beneath that path.

Before this change we were doing the context path filtering after the content was fetched.

This also makes so that include/exclude patterns are automatically namespaced by the source path, since it doesn't make sense to include files that are outside of the source path.

source.go Outdated Show resolved Hide resolved
This makes sure that if a path is specified on a context source that we
we only ever fetch the content from beneath that path.

Before this change we were doing the context path filtering after the
content was fetched.

This also makes so that include/exclude patterns are automatically
namespaced by the source path, since it doesn't make sense to include
files that are outside of the source path.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83
Copy link
Member Author

cpuguy83 commented Sep 4, 2024

@adamperlin updated this with a much cleaner implementation now.
We now update exclude patterns by prepending an exclusion of all content (*) with an exception of the provided path (!<path>) and add <path> to the list of follow paths (ie include pattern + follow symlink).

@cpuguy83 cpuguy83 added this to the v0.9.0 milestone Sep 4, 2024
@cpuguy83 cpuguy83 merged commit 31e8663 into Azure:main Sep 27, 2024
9 checks passed
@cpuguy83 cpuguy83 deleted the optimize_context branch September 27, 2024 17:41
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