zarf
zarf copied to clipboard
reimplement packager functions parent issue
Purpose:
As part of schema work it has been identified that src/packager
intertwines "deploy time" and "package create time" logic. This makes it burdensome, or possibly impossible, to implement versioned schemas without passing a versioned structs throughout the codebase.
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. E.g. - InspectOpts is moved into the inspect.go file withinpackager2
To Be Worked:
- [x] func New(cfg *types.PackagerConfig, mods ...Modifier) (*Packager, error)
- [x] func (p *Packager) ClearTempPaths()
- [ ] func (p *Packager) Create(ctx context.Context) error
- [ ] func (p *Packager) Deploy(ctx context.Context) error
- [ ] func (p *Packager) DevDeploy(ctx context.Context) error
- [ ] func (p *Packager) FindImages(ctx context.Context) (map[string][]string, error)
- [ ] func (p *Packager) Generate() (err error)
- [ ] func (p *Packager) GetVariableConfig() *variables.VariableConfig
- [x] func (p *Packager) Inspect(ctx context.Context) (err error)
- [x] func (p *Packager) Lint(ctx context.Context) error
- [x] func (p *Packager) Mirror(ctx context.Context) error
- [ ] func (p *Packager) Publish(ctx context.Context) (err error)
- [x] func (p *Packager) Pull(ctx context.Context) (err error)
- [x] func (p *Packager) Remove(ctx context.Context) (err error)