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

Packager Refactor - Parent Issue #3525

Open
brandtkeller opened this issue Feb 20, 2025 · 1 comment
Open

Packager Refactor - Parent Issue #3525

brandtkeller opened this issue Feb 20, 2025 · 1 comment
Assignees

Comments

@brandtkeller
Copy link
Contributor

brandtkeller commented Feb 20, 2025

Describe what should be investigated or refactored

As part of schema work it has been identified that src/packager intertwines "deploy time" and "package create time" logic.

We will begin by refactoring the following pieces of src/packager into src/packager2 - this will allow us to re-implement this functionality without making breaking changes to Zarf in between releases. We will then swap over the calls to packager.() functions to packager2.() and deprecate src/packager functionality for src/packager2 (while renaming packager2 to packager)

Decisions Made:

  • To refactor "Opts" out of the larger Packager struct, Opts will be moved into their respective "primary file". All exported functions will take its "related" Opts struct as a function argument.

Links to any relevant code

Additional context

Doing this work should consider the following targets:

  • Better unit testing
  • Less global state
  • Less side effects from calls such as os.Chdir
  • Cleaner API for library users
  • Support for standard cross-architecture workflows
@github-project-automation github-project-automation bot moved this to Triage in Zarf Feb 20, 2025
@brandtkeller brandtkeller moved this from Triage to In progress in Zarf Feb 20, 2025
@brandtkeller
Copy link
Contributor Author

See #2969 for historical reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

3 participants