Skip to content

Conversation

Ericson2314
Copy link
Member

Motivation

See the new extensive doxygen in url.hh

Context

New unit test of gitlab URL original from #13829.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner August 27, 2025 01:54
@github-actions github-actions bot added store Issues and pull requests concerning the Nix store fetching Networking with the outside (non-Nix) world, input locking labels Aug 27, 2025
@Ericson2314 Ericson2314 marked this pull request as draft August 27, 2025 04:26
Comment on lines 72 to 73
// FIXME %2F encode slashes? Does this command take/accept percent encoding?
args.push_back(urlPathToCanonPath(url.path).abs());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kip93 as an LFS connoisseur, can you shed some light on this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting question! I can't find any info on the server spec (neither here nor here) nor in the client docs either (here); and even digging through their tests I can't find anything, nor digging through reported issues. From what I see they are using go standard libraries though, so it's quite possible that this should support escape encoding.

I believe the best way to figure this out for sure is to test it. I can add a test to the git-lfs suite to figure out the behaviour and ensure we don't break anything in the future.

@xokdvium xokdvium force-pushed the parse-url-path branch 2 times, most recently from 39d6ad6 to 7964c36 Compare August 28, 2025 18:13
@xokdvium xokdvium marked this pull request as ready for review August 28, 2025 18:14
@xokdvium xokdvium force-pushed the parse-url-path branch 2 times, most recently from 5d84cbf to cb477b5 Compare August 28, 2025 18:25
: TarArchive{*source};
: TarArchive{*source};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, we should probably teach clang-format not to do this some day :)

@xokdvium xokdvium force-pushed the parse-url-path branch 2 times, most recently from 32d8035 to 988d4fe Compare August 28, 2025 18:53
See the new extensive doxygen in `url.hh`.
This fixes fetching gitlab: flakes.

Paths are now stored as a std::vector of individual path
segments, which can themselves contain path separators '/' (%2F).
This is necessary to make the Gitlab's /projects/ API work.

Co-authored-by: John Ericson <[email protected]>
Co-authored-by: Sergei Zimmerman <[email protected]>
Copy link
Member Author

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve Sergei's part!

Copy link
Contributor

@xokdvium xokdvium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Self-approve but this was reviewed and implemented together with @Ericson2314)

@Ericson2314 Ericson2314 merged commit f019f1b into master Aug 28, 2025
29 checks passed
@Ericson2314 Ericson2314 deleted the parse-url-path branch August 28, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fetching Networking with the outside (non-Nix) world, input locking store Issues and pull requests concerning the Nix store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants