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

When checking read/write access, if there is no access, surface the e… #1133

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

natalieparellano
Copy link
Member

…rror that occurred

This can be helpful in debugging failed builds where access is expected

…rror that occurred

This can be helpful in debugging failed builds where access is expected

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Copy link
Contributor

@jabrown85 jabrown85 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Natalie Arellano <narellano@vmware.com>
return "", err
}
if ok {
if ok, _ := checkReadAccess(image, keychain); ok {
Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally we'd log the error at this point, but that requires a logger, which is a bigger change

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano natalieparellano marked this pull request as ready for review June 26, 2023 19:15
@natalieparellano natalieparellano requested a review from a team as a code owner June 26, 2023 19:15
@natalieparellano natalieparellano merged commit f7708d9 into main Jun 26, 2023
7 checks passed
@natalieparellano natalieparellano deleted the err-when-failed-access branch June 26, 2023 19:21
if !img.CheckReadAccess() {
canRead, err := img.CheckReadAccess()
if !canRead {
cmd.DefaultLogger.Debugf("Error checking read access: %s", err)

Choose a reason for hiding this comment

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

We should log that without using Debug as some users using Tekton or kpack could not be aware about how to enable log level !!

if !img.CheckReadWriteAccess() {
canReadWrite, err := img.CheckReadWriteAccess()
if !canReadWrite {
cmd.DefaultLogger.Debugf("Error checking read/write access: %s", err)

Choose a reason for hiding this comment

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

We should log that without using Debug as some users using Tekton or kpack could not be aware about how to enable log level !!

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.

None yet

3 participants