-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: flow for plugin package file mapping and xattr tagging #979
feat: flow for plugin package file mapping and xattr tagging #979
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, although it's not clear why the integration tests fail. I wonder if github runners support xattrs.
One of the top results on kagi for "github ci runner xattr" was posted by this familiar face: So it seems I'll need to fix these tests by disabling the plugin xattr writes somehow, I'll investigate more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! It would be great to adjust the Path parameter if possible, otherwise I think it's doing what it's supposed to do. But please add a description to the PR, we'll want to know what this is about in the future.
@@ -58,7 +60,7 @@ def read_xattr(path: str, key: str) -> str | None: | |||
return value.decode().strip() | |||
|
|||
|
|||
def write_xattr(path: str, key: str, value: str) -> None: | |||
def write_xattr(path: str | Path, key: str, value: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For general API consistency it would be better to use only Path here, unless convenience suffers too much. Then it would be simpler to test this only with Path instead of testing with str and Path.
@@ -47,6 +47,8 @@ | |||
|
|||
logger = logging.getLogger(__name__) | |||
|
|||
_ORIGIN_PACKAGE_FORMAT = "origin_{plugin_name}_package" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit strange in isolate form but I see it's following the xattr pattern already used for stage packages.
@@ -1,3 +1,5 @@ | |||
# noqa: A005 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this will render the editor modeline below useless.
docs/reference/changelog.rst
)?Implement flow code, defined by https://docs.google.com/document/d/1wVtAYJouIXotd8iCZMZ_1VpmGpN0yoLfKcxeOBIgotw/edit?tab=t.0
(CRAFT-3741)