CI failing due to xattrs not supported
Metadata
Current evaluation
Fixed CI xattr failures by merging #678 (7a545c3a), moving xattr tests under the runner user's home directory on an xattr-capable filesystem.
Resolution: closed resolved
Reason: PR canonical/craft-parts#678 was merged as commit 7a545c3a. It moved xattr test files from the workspace to a temporary directory under the runner user's home, avoiding unsupported workspace filesystems.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
It appears a GitHub runner update has disable xattrs or changed filesystems? Regardless, tests are failing now.
### To Reproduce
https://github.com/canonical/craft-parts/actions/workflows/tests.yaml
### part yaml
```shell
n/a
```
### Relevant log output
```shell
=================================== FAILURES ===================================
____________ TestOriginStagePackage.test_mark_origin_stage_package _____________
path = '.tests-xattr-test-dir/bar'
key = 'user.craft_parts.origin_stage_package', value = 'package'
def write_xattr(path: str, key: str, value: str) -> None:
"""Add extended attribute metadata to a file.
:param path: The file to add metadata to.
:param key: The attribute key.
:param value: The attribute value.
"""
if sys.platform != "linux":
raise RuntimeError("xattr support only available for Linux")
# Extended attributes do not apply to symlinks.
if os.path.islink(path):
return
key = f"user.craft_parts.{key}"
try:
> os.setxattr(path, key, value.encode())
E OSError: [Errno 95] Operation not supported: '.tests-xattr-test-dir/bar'
/home/runner/work/craft-parts/craft-parts/craft_parts/xattrs.py:77: OSError
The above exception was the direct cause of the following exception:
self = <tests.unit.packages.test_base.TestOriginStagePackage object at 0x7f5c3a1ba6f0>
@pytest.mark.usefixtures("new_dir")
def test_mark_origin_stage_package(self):
test_dir = Path(".tests-xattr-test-dir")
test_dir.mkdir()
Path(test_dir / "foo").touch()
Path(test_dir / "bar").touch()
> base.mark_origin_stage_package(str(test_dir), "package")
/home/runner/work/craft-parts/craft-parts/tests/unit/packages/test_base.py:119:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/craft-parts/craft-parts/craft_parts/packages/base.py:274: in mark_origin_stage_package
write_origin_stage_package(file_path, stage_package)
/home/runner/work/craft-parts/craft-parts/craft_parts/packages/base.py:264: in write_origin_stage_package
xattrs.write_xattr(path, _STAGE_PACKAGE_KEY, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = '.tests-xattr-test-dir/bar'
key = 'user.craft_parts.origin_stage_package', value = 'package'
def write_xattr(path: str, key: str, value: str) -> None:
"""Add extended attribute metadata to a file.
:param path: The file to add metadata to.
:param key: The attribute key.
:param value: The attribute value.
"""
if sys.platform != "linux":
raise RuntimeError("xattr support only available for Linux")
# Extended attributes do not apply to symlinks.
if os.path.islink(path):
return
key = f"user.craft_parts.{key}"
try:
os.setxattr(path, key, value.encode())
except OSError as error:
# Label is too long for filesystem:
# OSError: [Errno 7] Argument list too long: b'<path>'
if error.errno == 7: # noqa: PLR2004
raise errors.XAttributeTooLong(path=path, key=key, value=value) from error
# Chain unknown variants of OSError.
> raise errors.XAttributeError(key=key, path=path, is_write=True) from error
E craft_parts.errors.XAttributeError: Unable to write extended attribute.
E Failed to write attribute 'user.craft_parts.origin_stage_package' on '.tests-xattr-test-dir/bar'.
E Make sure your filesystem supports extended attributes.
/home/runner/work/craft-parts/craft-parts/craft_parts/xattrs.py:85: XAttributeError
- generated xml file: /home/runner/work/craft-parts/craft-parts/results/test-results-test-py312.xml -
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed CI xattr failures by merging #678 (7a545c3a), moving xattr tests under the runner user's home directory on an xattr-capable filesystem. | |
| stealth/space-bunny-alpha | — | closed resolved | CI xattr failures were fixed by merged PR #678 (commit 7a545c3a), which moved xattr tests to a directory under the runner user's home. | |
| stealth/space-bunny-alpha | — | closed resolved | CI xattr failures were fixed by #678 (commit 7a545c3a), which moved xattr tests to a filesystem under the runner user's home directory. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. CI tests failed due to GitHub runners dropping extended attribute support. No fix was implemented, and the issue was closed after Jira sync, indicating it was abandoned or superseded by environment changes. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and deferred to internal tracking via Jira ticket CRAFT-2948. No public fix or pull request was merged to resolve the CI failure triggered by GitHub runner filesystem changes disabling extended attribute support. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The issue reported CI failures due to GitHub runners not supporting extended attributes. Only a Jira sync comment was added, and the issue remained inactive for over a year, indicating it was abandoned. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a fix or merge. CI failures stemmed from GitHub runner filesystem changes disabling extended attribute support. No resolution was implemented, and the ticket was abandoned after syncing to Jira. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-parts#678
(confidence 100%)
Merged PR that relocated xattr tests to the user's home directory.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #678 tests: use a path in the user's home directory for xattrs tests | craft-parts | merged | Merged in canonical/craft-parts#678 (commit 7a545c3a), moving xattr test files from the working directory to the user's home directory to avoid filesystems that do not support xattrs. |