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

WIP: Spec out extra repo support #365

Closed
wants to merge 1 commit into from
Closed

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Sep 4, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

@cpuguy83
Copy link
Member Author

cpuguy83 commented Sep 4, 2024

I think we should probably make this available from a separate file like we do with the signing spec so that we don't have to repeat the same thing in every single spec.

Also thinking of a slight change here: Instead of splitting up repo configs between build/install just add respective fields (or a string array with validated values) that includes which environments they need to go into. This may also help reduce duplication.

Keys []Source `yaml:"keys,omitempty" json:"keys,omitempty"`
// Config list of repo configs to to add to the environment. The format of
// these configs is going to be distro specific (e.g. apt/yum configs).
Config []Source `yaml:"config" json:"config"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it likely for one repository "unit" to need multiple config files? Just trying to understand why we need an array here

Copy link
Member Author

Choose a reason for hiding this comment

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

Mainly that I don't want to box in what can be done.
It also allows multiple repos to be installed at the same time using the same keys.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, that makes sense!

@cpuguy83
Copy link
Member Author

cpuguy83 commented Sep 4, 2024

Pushed a pretty significant change to what was already there.

// As an example, if the provided config is referencing a file backed repository
// then data would include the file data, assuming its not already available
// in the environment.
Data []SourceMount `yaml:"data,omitempty" json:"data,omitempty"`
Copy link
Member Author

Choose a reason for hiding this comment

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

Figured we could add this so that we can get rid of the extra step of adding a repo to the worker image in the tests.

@cpuguy83
Copy link
Member Author

cpuguy83 commented Sep 9, 2024

#366 is where the work to implement this is happening.

@cpuguy83 cpuguy83 closed this Sep 9, 2024
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