Skip to content

The oc set deployment-hook should default to Abort for failureStrategy. #17465

Open
@GrahamDumpleton

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/usabilitycomponent/clikind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.priority/P2sig/user-interface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions