The oc set deployment-hook should default to Abort for failureStrategy.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.7k
- Forks
- 4.8k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 53
Description
When you use oc set deployment-hook, the failurePolicy is defaulting to 'Ignore' when it should really be 'Abort'. The web console in contrast does default to 'Abort', so command line doesn't match what web console uses as one would expect.
Using 'Ignore' as a default is a bad idea because a failure of the hook means the deployment still occurs, when default expectation would be that it would fail the deployment unless you told it not to.
Version
oc v3.6.1+008f2d5
kubernetes v1.6.1+5115d708d7
features: Basic-Auth
Server https://127.0.0.1:8443
openshift v3.6.1+008f2d5
kubernetes v1.6.1+5115d708d7
Steps To Reproduce
Run:
oc set deployment-hook dc/blog --pre --dry-run -o json -- echo hi
Current Result
See:
"pre": {
"failurePolicy": "Ignore",
"execNewPod": {
"command": [
"echo",
"hi"
],
"containerName": "blog"
}
}
Expected Result
Expect to see:
"pre": {
"failurePolicy": "Abort",
"execNewPod": {
"command": [
"echo",
"hi"
],
"containerName": "blog"
}
}
Additional Information
None.
Contributor guide
No contributing guide indexed for this repository
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
Start by locating the implementation and tests for the oc set deployment-hook command, then reproduce the issue with the provided dry-run command. Update the default failure policy and add or adjust a regression test so the generated JSON reports failurePolicy as Abort when no policy is supplied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100