-
Notifications
You must be signed in to change notification settings - Fork 48
feature(pro_sources): craftctl chroot cmd #1350
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
base: main
Are you sure you want to change the base?
feature(pro_sources): craftctl chroot cmd #1350
Conversation
|
@tigarmo @canonical/starcraft-reviewers Need a review when you can 👀 |
| raise invalid_control_api_call( | ||
| message=( | ||
| f"invalid arguments to command {cmd_name!r} (want key=value)" | ||
| f"invalid arguments. {cmd_name!r} expected format <key>=<value>" |
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.
Please update test_craftctl_set_argument_error for this
| message=f"{cmd_name!r} can only run in overlay step", | ||
| ) | ||
|
|
||
| if len(cmd_args) < 1: |
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.
| if len(cmd_args) < 1: | |
| if not cmd_args: |
| assert lf.project_info.get_project_var("myvar2") == "val2" | ||
|
|
||
|
|
||
| def test_craftctl_chroot(new_dir, partitions, mocker): |
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.
Patching out chroot etc. makes this look like a unit test to me. Could you make an integration test that runs a real command inside the chroot?
medubelko
left a comment
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 suggested some polish for the release note. :)
| - Introduced a new sub command called ``chroot`` to ``craftctl`` which allows users to | ||
| run a command inside the overlay of a part. |
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.
| - Introduced a new sub command called ``chroot`` to ``craftctl`` which allows users to | |
| run a command inside the overlay of a part. | |
| - Add ``craftctl chroot`` sub-command, for running a command inside a part's overlay. |
This PR is part of Rockcraft's
pro_sourcesfeature set and includes the following features:chrootsub command forcraftctlto enable modification to the overlay during theoverlay-script