Skip to content

NO-JIRA: Handle wrapped ENOTSUP error#2311

Open
rh-roman wants to merge 1 commit into
openshift:mainfrom
rh-roman:fix-error-handler
Open

NO-JIRA: Handle wrapped ENOTSUP error#2311
rh-roman wants to merge 1 commit into
openshift:mainfrom
rh-roman:fix-error-handler

Conversation

@rh-roman

@rh-roman rh-roman commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

system.Lsetxattr wraps syscall errors in XattrError, so comparing the
result with == against syscall.ENOTSUP and ErrNotSupportedPlatform never
matched, causing layer extraction to fail on filesystems that do not
support xattrs instead of silently skipping them.

Replace both == comparisons with errors.Is.

Co-Authored-By: Claude Sonnet 4.6

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility when restoring archived files across platforms.
    • Unsupported extended-attribute operations are now handled reliably without interrupting extraction.

system.Lsetxattr wraps syscall errors in XattrError, so comparing the
result with == against syscall.ENOTSUP and ErrNotSupportedPlatform never
matched, causing layer extraction to fail on filesystems that do not
support xattrs instead of silently skipping them.

Replace both == comparisons with errors.Is.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openshift-ci
openshift-ci Bot requested review from atiratree and ingvagabund July 13, 2026 17:37
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

createTarFile now uses wrapped-error matching when ignoring unsupported extended-attribute errors during archive creation.

Changes

Xattr error handling

Layer / File(s) Summary
Use wrapped error matching
pkg/cli/image/archive/archive.go
Adds the errors import and replaces direct comparisons with errors.Is checks for unsupported platform and ENOTSUP errors.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: rhamitarora, rhmdnd, ardaguclu, cfergeau, soltysh

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Comment @coderabbitai help to get the list of available commands.

Comment thread pkg/cli/image/archive/archive.go
@rh-roman

Copy link
Copy Markdown
Contributor Author

/retest

@ardaguclu

Copy link
Copy Markdown
Member

Thank you
/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, rh-roman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2026
@rh-roman

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@rh-roman

Copy link
Copy Markdown
Contributor Author

/retest

@ardaguclu

Copy link
Copy Markdown
Member

Failure is unrelated and supposed to be fixed by #2315
/override ci/prow/okd-scos-images

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@ardaguclu: Overrode contexts on behalf of ardaguclu: ci/prow/okd-scos-images

Details

In response to this:

Failure is unrelated and supposed to be fixed by #2315
/override ci/prow/okd-scos-images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@rh-roman: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@rh-roman

Copy link
Copy Markdown
Contributor Author

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 16, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@rh-roman: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rh-roman rh-roman changed the title fix xattr ENOTSUP check broken by error wrapping in createTarFile NO-JIRA: Handle wrapped ENOTSUP error Jul 16, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 16, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@rh-roman: This pull request explicitly references no jira issue.

Details

In response to this:

system.Lsetxattr wraps syscall errors in XattrError, so comparing the
result with == against syscall.ENOTSUP and ErrNotSupportedPlatform never
matched, causing layer extraction to fail on filesystems that do not
support xattrs instead of silently skipping them.

Replace both == comparisons with errors.Is.

Co-Authored-By: Claude Sonnet 4.6

Summary by CodeRabbit

  • Bug Fixes
  • Improved compatibility when restoring archived files across platforms.
  • Unsupported extended-attribute operations are now handled reliably without interrupting extraction.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants