For omnitruck the `-c current` and/or `-n` switch should still serve releases promoted to stable
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 13
- Forks
- 55
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 8
Description
i'm running this should always give me the latest and greatest:
# curl https://omnitruck.chef.io/current/install.sh | sudo bash -s -- -c current
when i ran this before 12.9.38 was promoted to stable, i got 12.9.38 installed. after 12.9.38 was promoted to stable i get downgraded:
# curl https://omnitruck.chef.io/current/install.sh | sudo bash -s -- -c current
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 19552 100 19552 0 0 23258 0 --:--:-- --:--:-- --:--:-- 23248
ubuntu 14.04 x86_64
Getting information for chef current for ubuntu...
downloading https://omnitruck.chef.io/current/chef/metadata?v=&p=ubuntu&pv=14.04&m=x86_64
to file /tmp/install.sh.4715/metadata.txt
trying wget...
sha1 bbd37fa0343f8554eb16e7bad658f3c59b2da0d8
sha256 3eef90ae0ce1d999f6c8ba986847f27da050eb6f4472f90810db062f9fed0d81
url https://packages.chef.io/current/ubuntu/14.04/chef_12.9.36-1_amd64.deb
version 12.9.36
downloaded metadata file looks valid...
downloading https://packages.chef.io/current/ubuntu/14.04/chef_12.9.36-1_amd64.deb
to file /tmp/install.sh.4715/chef_12.9.36-1_amd64.deb
trying wget...
Comparing checksum with sha256sum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing chef
installing with dpkg...
dpkg: warning: downgrading chef from 12.9.38-1 to 12.9.36-1
(Reading database ... 565869 files and directories currently installed.)
Preparing to unpack .../chef_12.9.36-1_amd64.deb ...
Unpacking chef (12.9.36-1) over (12.9.38-1) ...
Setting up chef (12.9.36-1) ...
Thank you for installing Chef!
That is definitively poor behavior.
Also this is a regression of a bug that was fixed in old omnitruck:
https://github.com/chef/omnitruck/pull/100
In that change, we made it so that -n (or -p) would always pull the latest -- even if the latest was a release verison and not a prerelease version. There was absolutely no use case that wanted the prior behavior and it fixed several bugs.
I don't really care how this gets fixed. If -c current and -c stable want to be the literal current and stable channels and we still want to mv from current to stable, so that literally artifacts in current disappear (which i still thing is poor behavior for anyone consuming current) then we should implement another flag which returns current artifacts in preference to stable ones. probably we should fix this so that artifacts in current are not removed from current when they are promoted to stable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the shown install.sh command with -c current and inspect how current and stable metadata are selected, comparing the behavior with old omnitruck PR #100. Confirm the intended behavior for promoted releases and the -n/-p switches; done means the command no longer downgrades an installed release and the channel semantics have regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, ruby
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100