Skip to content

refactor(update-agent-loader): pass configuration in explicitly#650

Merged
TheButlah merged 3 commits into
mainfrom
thebutlah/fix-non-hermetic-build
Aug 21, 2025
Merged

refactor(update-agent-loader): pass configuration in explicitly#650
TheButlah merged 3 commits into
mainfrom
thebutlah/fix-non-hermetic-build

Conversation

@TheButlah
Copy link
Copy Markdown
Contributor

@TheButlah TheButlah commented Aug 20, 2025

Following changes were made:

  • add orb- prefix, as conventional in our workspace
  • set version to 0.0.0. as conventional in our workspace
  • Added a Config struct which has a from_env function, call this in main, and pass this into the rest of the code to be explicit about configuration of the program (and make it more possible to test the code)
  • Removed build.rs as it both doesn't make sense to check target os and error (the code will already error if its platform specific) and was non-hermetic (randomly generates build-time compiled constants from a non-seeded RNG)
  • As per @alekseifedotov's request, I kept the constraint that if a public key is not provided at build time, a randomly generated private key will be used. the difference now is that this random generation happens at run time, not build time. And with the dependency injection, it is now possible to see that random pubkey in tests.

@TheButlah TheButlah force-pushed the thebutlah/fix-non-hermetic-build branch 2 times, most recently from 9cd6e99 to ee6f1a3 Compare August 20, 2025 19:37
@TheButlah TheButlah marked this pull request as ready for review August 20, 2025 19:38
@TheButlah TheButlah requested a review from a team as a code owner August 20, 2025 19:38
@TheButlah TheButlah force-pushed the thebutlah/fix-non-hermetic-build branch from ee6f1a3 to f09f257 Compare August 20, 2025 22:32
Comment thread update-agent-loader/src/memfile.rs Outdated
Comment thread update-agent-loader/src/memfile.rs Outdated
@TheButlah TheButlah force-pushed the thebutlah/fix-non-hermetic-build branch from f09f257 to 7d03ef8 Compare August 21, 2025 19:22
@TheButlah TheButlah enabled auto-merge (squash) August 21, 2025 19:30
@TheButlah TheButlah merged commit 002b0d4 into main Aug 21, 2025
24 checks passed
@TheButlah TheButlah deleted the thebutlah/fix-non-hermetic-build branch August 21, 2025 19:33
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