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

Feature request: atmos vendor pull --all #301

Closed
osterman opened this issue Jan 12, 2023 · 1 comment · Fixed by #768
Closed

Feature request: atmos vendor pull --all #301

osterman opened this issue Jan 12, 2023 · 1 comment · Fixed by #768

Comments

@osterman
Copy link
Member

osterman commented Jan 12, 2023

Describe the Feature

As we make more extensive use of vendoring, especially as part of our blueprints, adding the ability to rapidly vendor all components would speed up the cold start process.

Expected Behavior

A clear and concise description of what you expected to happen.

Running the command:

atmos vendor pull --all

If the the component folder has files other than the component.yaml and a README.md, then the vendoring would be skipped unless the --refresh flag is passed.

Running the command would cause atmos to recursively find all component.yaml files in every component folder and perform a vendor pull

A --dry-run argument would cause atmos to run through all component folders and determine where it would vendor, and where it would skip. Combining --dry-run with --refresh would result in all vendor'able folders being emitted.

Use Case

  1. Cold starts. Also, it would be helpful for companies that choose not to commit vendored components.
  2. Upgrades. Bump the version of components and fetch them all. If combined with atmos describe affected, it would be easy to understand which components are out-of-date.

Describe Ideal Solution

A clear and concise description of what you want to happen. If you don't know, that's okay.

Alternatives Considered

We currently use workflows. Subcommands would also fit the bill.

Something like the following could also work, but this functionality would be better suited as core functionality.

(This example has not been tested)

# subcommand in atmos.yaml
commands:
  - name: vendor pull all
    description: This command vendors every component folder that has a component.yaml
    steps:
      - find components/ -type f -name 'component.yaml' | dirname | xargs atmos vendor pull {} \;

Relates to

@max-lobur
Copy link

max-lobur commented Jan 12, 2023

Minor addition to the implementation:

vendor pull --component the component argument can be replaced with something like path and then do find $path -type f. This will let pulling individual components, directories of components like we have for eks, or all if you just pass ./components. Should make it easier to work with larger trees.

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

Successfully merging a pull request may close this issue.

2 participants