Update command to install chocolatey packages#341
Update command to install chocolatey packages#341l0rd wants to merge 1 commit intocontainers:mainfrom
Conversation
Changes `choco install` command to ahdere to chocolatey scripting best practices: https://docs.chocolatey.org/en-us/choco/commands/#scripting-integration-best-practices-style-guide In particular: - use `choco upgrade` rather `choco install` - move the package name to be the first parameter - explicitly set choco source Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
cevich
left a comment
There was a problem hiding this comment.
LGTM. To get CI un-stuck: run make IMG_SFX in the repo root and commit the result. Think of this similar to a record of the "latest" image tag.
|
This isn't actually going to do anything. Builds are working again today. Chocolatey must've just been down yesterday. |
I tried to do that but it doesn't work in |
That's an intentional check Ed added, since pushing would simply fail to build (due to the same thing). They're put in place to mark temporary workarounds that need to be reviewed at a future date. Ed's really been doing the best job keeping track of the "why" for each of these timebomb blocks, so I normally would consult with him. But...
...maybe this PR should be closed? (though we appreciate the time/effort you put into it). |
Even if doesn't fix the problem that @edsantiago faced, this PR introduces an improvement in the code base (see the PR description). Why would you close it? |
Thanks for pushing back. I would defer to your expertise on the subject. @edsantiago since you're already building images, and chocolaty seems to be behaving, would you consider rebasing these changes into your PR? An alternative is, eat the risk and add the magic |
| } | ||
|
|
||
| choco install -y --allow-downgrade --execution-timeout=300 $pkg | ||
| choco upgrade $pkg -y --allow-downgrade --execution-timeout=300 --source="'https://community.chocolatey.org/api/v2'" |
There was a problem hiding this comment.
(non-blocking) Do you think it might be helpful to other non-windows-expert maintainers, to include a comment here:
# ahdere to chocolatey scripting best practices.
# ref: https://docs.chocolatey.org/en-us/choco/commands/#scripting-integration-best-practices-style-guide
|
I can't fold this into any of my PRs, and I can't condone force-merging it either. Rearranging arg order is fine, but:
Since I'm doomed to spend my days rebuilding VMs, I will incorporate two changes into one of my future PRs: rearrange args, and add a link to chocolatey best practices. But I humbly ask you not to incorporate this PR as it stands. |
I agree that the chocolatey scripting "best practices" are counterintuitive and can be hard to maintain. Ignoring them though, can hurt us even more in the future. As per your request I am closing this PR and will let you decide what to include or not in yours. |
|
Thanks @l0rd for working with us and sharing your expertise. I'm confident meaningful improvements will come from this. |
Changes
choco installcommand to ahdere to chocolatey scripting best practices.In particular:
choco upgraderatherchoco install