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/6584 content type for lakectl local #6644

Conversation

0x-chaitu
Copy link

Closes #6584

Change Description

Background

Followed code from lakectl fs upload.

Bug Fix

If this PR is a bug fix, please let us know about:

  1. Problem - lakectl local didnt support --content-type flag.
  2. Solution - added content-type support

Testing Details

How were the changes tested?

They were tested by running lakectl local to upload files with content-type flag

Contact Details

[email protected]

Copy link
Contributor

@itaiad200 itaiad200 left a comment

Choose a reason for hiding this comment

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

Hey @0x-chaitu - thank you for your efforts. We value every contribution to this project, it's all about the community :)

Regarding the code, notice that unlike lakectl fs upload ..., lakectl local commit ... may upload many objects with different content types at once. When the user request for it explicitly using a flag, we should identify the content automatically and not rely on a single given content that cannot fit all types. Other than that, the PR looks very promising.

@itaiad200 itaiad200 added contributor include-changelog PR description should be included in next release changelog labels Sep 23, 2023
@0x-chaitu
Copy link
Author

Thanks @itaiad200,
Yes I will add --include-content-type flag with the automation.

@itaiad200 itaiad200 self-assigned this Sep 28, 2023
Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

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

I don't understand what the --content-type flag does. AFAICT it gives the same content type to all objects in my commit. Can you give a use-case for why this would be useful?

localCommitAllowEmptyMessage = "allow-empty-message"
localCommitMessageFlagName = "message"
localContentTypeFlagName = "content-type"
localIncludeContentTypeFlagName = "include-content-type"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
localIncludeContentTypeFlagName = "include-content-type"
localIncludeContentTypeFlagName = "detect-content-type"

@@ -120,7 +124,7 @@ var localCommitCmd = &cobra.Command{
}()
sigCtx := localHandleSyncInterrupt(cmd.Context(), idx, string(commitOperation))
s := local.NewSyncManager(sigCtx, client, syncFlags.parallelism, syncFlags.presign)
err = s.Sync(idx.LocalPath(), remote, c)
err = s.Sync(idx.LocalPath(), remote, c, contentType, includeContentType)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand. When would I want to set contentType to the same value on all the files in a Sync?

@arielshaqed
Copy link
Contributor

THANKS

for picking up this issue and working to fix it. This is really appreciated, and a great way to improve lakeFS as a product.

@nopcoder
Copy link
Contributor

Hi @0x-chaitu, could you please provide an update on the PR status?

@0x-chaitu
Copy link
Author

Hi @0x-chaitu, could you please provide an update on the PR status?

Hi @nopcoder, @itaiad200 has self-assigned the issue.

@itaiad200
Copy link
Contributor

Hey @0x-chaitu , I self-assigned the PR so I could track this better. We do that normally for all contributors. Do you still intend to work on this PR or should we take it?

@0x-chaitu
Copy link
Author

Hey, @itaiad200 Please take it.

Copy link

github-actions bot commented Dec 9, 2023

This PR is now marked as stale after 30 days of inactivity, and will be closed soon. To keep it, mark it with the "no stale" label.

@github-actions github-actions bot added the stale label Dec 9, 2023
Copy link

Closing this PR because it has been stale for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor include-changelog PR description should be included in next release changelog stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Currently lakectl local doesn't support upload with content type.
4 participants