charmed-kubernetes / actions-operator

Apache License 2.0
7 stars 18 forks source link

Validate return codes when initializing microk8s #59

Closed DanielArndt closed 8 months ago

DanielArndt commented 1 year ago

Without this change, if the can-i commands failed, the build would ignore it and continue after 2 minutes.

Furthermore, the can-i --as=me command is only relevant when RBAC is enabled, so this change also checks for that before waiting on that command. Subtly introduced in https://github.com/charmed-kubernetes/actions-operator/pull/46 when addons were made configurable.

Admittedly, I was unsure how to test this locally, so I'm depending a bit on the e2e tests here.

DanielArndt commented 1 year ago

Honestly this action should probably list those inputs as a list of strings rather than space separated strings... too late now

Yes, I agree. I considered making this change, but didn't want to go down the road of changing the contract for this fix. I agree that's the best long-term approach, but would probably be a breaking change unless we wanted to add some backward compatibility.

DanielArndt commented 1 year ago

@addyess

You'll need to build this and check in the resulting built js files

Sorry for the delay here. I had an error about missing ncc and didn't have time to figure out what was going on until now. I needed to do an npm install --include=dev as well.

DanielArndt commented 8 months ago

Closing as this has gone stale