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

Fix: Delta export path unescape #7473

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
CR Fixes
  • Loading branch information
N-o-Z committed Feb 19, 2024
commit fe8ef07bfc37a6d5f8dd7ddd00e31c0b7c3c2748
5 changes: 5 additions & 0 deletions pkg/actions/lua/lakefs/catalogexport/delta_exporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ local function export_delta_log(action, table_def_names, write_object, delta_cli
local code, obj = lakefs.stat_object(repo, commit_id, unescaped_path)
if code == 200 then
local obj_stat = json.unmarshal(obj)
--[[
This code block handles escaping of the physical address path part
Since we don't want to escape the entire URL (i.e. schema, host), we parse the url and rebuild it.
Building the url will then handle any escaping needed on the relevant parts.
]]
local u = url.parse(obj_stat["physical_address"])
local physical_path = url.build_url(u["scheme"], u["host"], u["path"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why we parse and then build what looks like the exact same URL. Is this somehow the way to unescape? If so, please add a comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

if entry.add ~= nil then
Expand Down
Loading