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

Add esti tests for lakectl local with POSIX permissions #7962

Merged
merged 6 commits into from
Jul 7, 2024

Conversation

itaigilo
Copy link
Contributor

@itaigilo itaigilo commented Jul 7, 2024

No description provided.

@itaigilo itaigilo added exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached labels Jul 7, 2024
@itaigilo itaigilo requested review from N-o-Z and guy-har July 7, 2024 07:41
return LakectlWithParamsWithPosixPerms(accessKeyID, secretAccessKey, endPointURL, false)
}

func LakectlWithParamsWithPosixPerms(accessKeyID, secretAccessKey, endPointURL string, withPosixPerms bool) string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding this explicitly -
Rather keep this easy to delete (assuming it'll happen in the near future),
Than mess the whole code with changes (of adding a new param).

Copy link

github-actions bot commented Jul 7, 2024

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed

Copy link
Contributor

@guy-har guy-har left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 279 to 280
// the following commit "initializes" the posix permissions for the remote repo
runCmd(t, lakectl+" local commit "+dataDir+" --allow-empty-message -m \" \"", false, false, vars)
Copy link
Contributor

@guy-har guy-har Jul 7, 2024

Choose a reason for hiding this comment

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

nit: make it the commit message instead of a comment

Suggested change
// the following commit "initializes" the posix permissions for the remote repo
runCmd(t, lakectl+" local commit "+dataDir+" --allow-empty-message -m \" \"", false, false, vars)
commitMsg := "initialize the posix permissions for the remote repo"
runCmd(t, lakectl+" local commit "+dataDir+" -m " + commitMsg, false, false, vars)

Copy link
Contributor

Choose a reason for hiding this comment

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

TBH I prefer the fmt.Sprintf way, I noticed it's like that from previous tests as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that fmt.Sprintf will make this much less readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anyway, good ideas -
Updated.


// the following commit "initializes" the posix permissions for the remote repo
runCmd(t, lakectl+" local commit "+dataDir+" --allow-empty-message -m \" \"", false, false, vars)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add another validation here to check no changes after commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -277,7 +277,8 @@ func (s *SyncManager) upload(ctx context.Context, rootPath string, remote *uri.U
if err := fileutil.VerifySafeFilename(source); err != nil {
return err
}
dest := strings.TrimPrefix(filepath.ToSlash(fmt.Sprintf("%s%s%s", remote.GetPath(), uri.PathSeparator, path)), uri.PathSeparator)
remotePath := strings.TrimRight(remote.GetPath(), uri.PathSeparator)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding this change, see this PR.

@itaigilo itaigilo enabled auto-merge (squash) July 7, 2024 17:30
@itaigilo itaigilo merged commit e7e001e into master Jul 7, 2024
35 checks passed
@itaigilo itaigilo deleted the task/add-esti-tests-for-local-posix-perms branch July 7, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants