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

Add cli flag for specifying bundle mode #195

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Conversation

dtheyer
Copy link
Contributor

@dtheyer dtheyer commented Nov 1, 2024

Bundle mode is much faster, but can break in some edgecases. Allowing a cli arg to override the config value makes it easier for developers to disable it for one-off tests which require standard mode.

With bundle mode set to :compatible mode in my config, both bundle and standard uploads are done:

[dtheyer@devvm25808.prn0:tt2]$ /opt/chef-workstation/embedded/bin/ruby ~/tt2/bin/taste-tester upload 
Loading plugin at /etc/taste-tester/hooks/prod-hooks.rb
Starting taste-tester server
Using /home/dtheyer/repo
Doing full upload
Creating bundle...
Running bundle upload
Uploading cookbooks...
Uploading roles...
Uploading databags...

When I set bundle mode to true:

/opt/chef-workstation/embedded/bin/ruby ~/tt2/bin/taste-tester upload -b true
Loading plugin at /etc/taste-tester/hooks/prod-hooks.rb
Using /home/dtheyer/opsfiles
Doing full upload
Creating bundle...
Running bundle upload

When set to false:

/opt/chef-workstation/embedded/bin/ruby ~/tt2/bin/taste-tester upload -b false
Loading plugin at /etc/taste-tester/hooks/prod-hooks.rb
Restarting taste-tester server for config change
Using /home/dtheyer/opsfiles
Doing full upload
Uploading cookbooks...
Uploading roles...
Uploading databags...

When set to compatible

/opt/chef-workstation/embedded/bin/ruby ~/tt2/bin/taste-tester upload -b compatible --skip-repo-checks
Loading plugin at /etc/taste-tester/hooks/prod-hooks.rb
Restarting taste-tester server for config change
Using /home/dtheyer/opsfiles
Doing full upload
Creating bundle...
Running bundle upload
Uploading cookbooks...
...

@dafyddcrosby dafyddcrosby merged commit c9f3b8c into facebook:main Nov 1, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants