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

Separate messages for Copy and Push options regarding lock output flag #377

Merged
merged 2 commits into from
Apr 28, 2022
Merged

Separate messages for Copy and Push options regarding lock output flag #377

merged 2 commits into from
Apr 28, 2022

Conversation

vicmarbev
Copy link
Contributor

This PR is a response to issue #354. Different functions to create the Cobra flag for push and copy commands, each one with its own text.

@vicmarbev vicmarbev temporarily deployed to TanzuNet Registry Dev e2e April 20, 2022 07:21 Inactive
@vicmarbev vicmarbev temporarily deployed to GCR e2e April 20, 2022 07:21 Inactive
@vicmarbev
Copy link
Contributor Author

It seems that the linter does not like the exported methods (even though the Set function was with capital 'S'). Should I do something about this?

Also, the performance test is .8 seconds slower, but I haven't changed anything about that.

@joaopapereira
Copy link
Member

When you create new public functions you need to add a comment.
This linter was added after a big chunk of the code was already in place, so when changing older functions we need to add the comments.
You can see an example in https://github.com/vmware-tanzu/carvel-imgpkg/blob/develop/pkg/imgpkg/registry/registry.go#L102

@vicmarbev vicmarbev temporarily deployed to TanzuNet Registry Dev e2e April 22, 2022 06:43 Inactive
@vicmarbev vicmarbev temporarily deployed to GCR e2e April 22, 2022 06:43 Inactive
@vicmarbev
Copy link
Contributor Author

It seems there was a problem reading the images to copy:
Error: perf_test.go:63: Failed to successfully execute 'imgpkg copy -b 127.0.0.1:35721/repo/perf-image --to-repo 127.0.0.1:35721/repo/perf-imagecopy --yes': Execution error: stdout: '' stderr: 'imgpkg: Error: Reading Images from Bundle: Checking if 'index.docker.io/cloudfoundry/minio-cf-for-k8s@sha256:5cb64001e21d6e3adb05717ca49aca34d52f576cf8365af28860d4afad383ea4' is a bundle: GET https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/2a/2aa1d6d1e1dccae62ad2c2c3c35a303b9edfb793e57d39004540c54eb7781478/data?verify=REDACTED: unexpected status code 409 Conflict: error code: 1023 ' error: 'exit status 1'

Also, other test shows that we are too slow by 0.2 seconds:
=== RUN TestCopyingLargeImageWithinSameRegistryShouldBeFast Running 'imgpkg copy -i 127.0.0.1:53077/repo/perf-image --to-repo 127.0.0.1:53077/repo/perf-image1 --yes'... initial push took: 21.7880665s imgpkg copy took: 1.6420038s assertion_compare.go:313: Error Trace: perf_test.go:49 Error: "1452537766" is not greater than "16[42](https://github.com/vmware-tanzu/carvel-imgpkg/runs/6161215029?check_suite_focus=true#step:7:42)003800" Test: TestCopyingLargeImageWithinSameRegistryShouldBeFast Messages: [copying a large image took too long. Expected it to take maximum [%v] but it took [%v] 1.[45](https://github.com/vmware-tanzu/carvel-imgpkg/runs/6161215029?check_suite_focus=true#step:7:45)2537766s 1.6420038s]

@vicmarbev
Copy link
Contributor Author

After a rerun, the only failing test is the performance one. As we haven't changed behavior, should we modify the failing threshold? or does it merit investigation?

Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

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

LGTM

@joaopapereira
Copy link
Member

@vicmarbev I created this issue #380 to track the investigation and eventually take some measures to save some of this information in order to understand in the future if we see degradation with time or not.

Nevertheless, I will merge your PR.

@joaopapereira joaopapereira merged commit 68ebc6e into carvel-dev:develop Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants