Skip to content

Map target paths and target exclude paths for archive/git refs#3003

Merged
doriable merged 7 commits intomainfrom
archive-ref-paths
May 21, 2024
Merged

Map target paths and target exclude paths for archive/git refs#3003
doriable merged 7 commits intomainfrom
archive-ref-paths

Conversation

@doriable
Copy link
Member

In CLI versions pre-1.32.0, for archive and git refs, we would map
the root of the bucket of archive and git refs to the subDirPath,
which is inconsistent with the behavior for dir refs (which maps
target paths and target exclude paths to the execution context).

In 1.32.0, we made changes to handle subDirPath, target paths,
and target exclude paths in a unified way, however this is not
backwards compatible with pre-1.32.0 versions. So, in order
to be backwards compatible, we need to remap the target
paths and target exclude paths.

I explored an option to check of the subDirPath contains
the target paths and target exclude paths before remapping,
however this is brittle, since we could hit an edge case with
directories that have the same name nested:

.
└── proto
    └── foo
        └── foo

Tests have been adjusted to reflect this change.

@bufdev
Copy link
Member

bufdev commented May 21, 2024

Needs changelog entry for when we do 1.32.1 release

Co-authored-by: Nick Snyder <nickdsnyder@gmail.com>
Co-authored-by: Nick Snyder <nickdsnyder@gmail.com>
@doriable doriable merged commit a6ff911 into main May 21, 2024
@doriable doriable deleted the archive-ref-paths branch May 21, 2024 18:43
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.

3 participants