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

Transfer - Fix and improve long props check #1044

Merged
merged 3 commits into from
Nov 26, 2023
Merged

Conversation

yahavi
Copy link
Member

@yahavi yahavi commented Nov 23, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Enhance and refine the long properties check that occurs after executing jf rt transfer-files <source> <target> --precheck:

  • Extend the timeout period from 1 minute to 30 minutes.
  • Utilize .distinct(false) whenever feasible.

@yahavi yahavi added the improvement Automatically generated release notes label Nov 23, 2023
@yahavi yahavi requested a review from eyalbe4 November 23, 2023 13:43
@yahavi yahavi self-assigned this Nov 23, 2023
Copy link
Contributor

@eyalbe4 eyalbe4 left a comment

Choose a reason for hiding this comment

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

Notice thar some of the tests on this PR haven't passed.

@@ -131,7 +134,7 @@ func (lpc *LongPropertyCheck) longPropertiesTaskProducer(progress *progressbar.T
if long := isLongProperty(property); long {
log.Debug(fmt.Sprintf(`Found long property ('@%s':'%s')`, property.Key, property.Value))
if lpc.producerConsumer != nil {
_, _ = lpc.producerConsumer.AddTaskWithError(createSearchPropertyTask(property, lpc.repos, args, lpc.filesChan, progress), lpc.errorsQueue.AddError)
_, _ = lpc.producerConsumer.AddTaskWithError(lpc.createSearchPropertyTask(property, args, progress), lpc.errorsQueue.AddError)
Copy link
Contributor

Choose a reason for hiding this comment

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

This part - _, _ = can be removed, as non of the returned values are used by this code.

Copy link
Member Author

Choose a reason for hiding this comment

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

The static code analysis doesn't like it

artifactory/commands/transferfiles/longpropertycheck.go Outdated Show resolved Hide resolved
@yahavi yahavi merged commit bd87ea9 into jfrog:dev Nov 26, 2023
7 of 8 checks passed
@yahavi yahavi deleted the fix-precheck branch November 26, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants