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

Remote script execution for snaps #209

Merged
merged 9 commits into from
Feb 20, 2024
Merged

Remote script execution for snaps #209

merged 9 commits into from
Feb 20, 2024

Conversation

mcw-work
Copy link
Contributor

  • Enable remote script execution in the snap.
  • When a snap execute all scripts as root (confined by the snap)
  • Add LD_LIBRARY and PYTHONPATH env variables to script execution environment.

* When a snap execute all scripts as root (confined by the snap)
* Add LD_LIBRARY and PYTHONPATH env variables to script execution environment.
Restructure IS_SNAP tests
@mcw-work mcw-work closed this Feb 1, 2024
Update test to match script env_vars
@mcw-work
Copy link
Contributor Author

mcw-work commented Feb 3, 2024

updated tests to match changes to script execution.

@mcw-work mcw-work reopened this Feb 3, 2024
@mcw-work mcw-work closed this Feb 3, 2024
@mcw-work
Copy link
Contributor Author

mcw-work commented Feb 5, 2024

Added unit tests for when script is called from a snap

@mcw-work mcw-work reopened this Feb 5, 2024
@mcw-work mcw-work closed this Feb 7, 2024
@mcw-work mcw-work reopened this Feb 13, 2024
@mcw-work
Copy link
Contributor Author

Tests all passed

Copy link
Contributor

@Perfect5th Perfect5th left a comment

Choose a reason for hiding this comment

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

Tests pass, nice! Have you (or someone else) ensured that script execution works with this version both on core and classic, then?

landscape/client/manager/scriptexecution.py Outdated Show resolved Hide resolved
@mcw-work
Copy link
Contributor Author

Yeap - I have installed it on a x86 classic machine and a pi core device and they both work fine. The scripts that are saved in the snap-management-demo account on the staging server are also tested and verified as working - that includes one as a heredoc, one using REST API directly and one using Snap-HTTP. Stephen and Yanisa are having a look at what we need to document as well so we don't fall too far behind with that.

@Perfect5th Perfect5th merged commit b7b4b35 into canonical:master Feb 20, 2024
5 checks passed
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.

2 participants