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

RSDK-9607: add build and run options for all Python modules; remove run option for Go #4818

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

purplenicole730
Copy link
Member

@purplenicole730 purplenicole730 commented Feb 26, 2025

Originally, users could only use the run.sh script for local Python modules, and only hot reloading for cloud Python modules. Both methods should be available for both, even if there's a default. Go should never be using run.sh, as a user should not be building a Go binary on an embedded device every time a module is updated or restarted.

Changes:

  • adds the build setup for local Python modules
  • adds the run script to cloud Python modules
  • removes the run.sh from Golang modules

Flyby:

  • hot reloading for cloud Python modules were no longer working with directory changes, so made it work for both local and cloud Python modules

Testing Process:

  1. Generate one local Python module, one Python module with cloud build enabled, one local Golang module, and one Golang module with cloud build enabled.
  2. Change each module's do_command to print a log.
  3. Add both Python modules to a machine using the run.sh.
  4. Call do_command() from a sensor using local Python module -- ✅
  5. Call do_command() from a sensor using cloud Python module -- ✅
  6. Add both Go modules to a machine using make setup and make build
  7. Call do_command() from a sensor using local Go module -- ✅
  8. Call do_command() from a sensor using cloud Go module -- ✅
  9. Add both Python modules to a machine using PyInstaller.
  10. Call do_command() from a sensor using local Python module -- ✅
  11. Call do_command() from a sensor using cloud Python module -- ✅

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Feb 26, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 26, 2025
@purplenicole730 purplenicole730 changed the title RSDK-9607: add build to local modules; add run to cloud modules RSDK-9607: add build and run options for all Python modules; remove run option for Go Feb 27, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 28, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 28, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 28, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Feb 28, 2025
@purplenicole730 purplenicole730 marked this pull request as ready for review February 28, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants