New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation is not failing for an invalid components #630
Comments
buildConfig (env variable is defined incorrectly) {
"metadata":{
"name": "test-os-build",
},
"kind": "Template",
"apiVersion": "v1beta1",
"description": "description or something",
"parameters": [],
"items": [
{
"metadata":{
"name": "the-build2",
},
"kind": "BuildConfig",
"apiVersion": "v1beta1",
"triggers": [],
"parameters": {
"source" : {
"type" : "Git",
"git" : {
"uri": "https://github.com/TomasTomecek/docker-hello-world.git"
}
},
"strategy": {
"type": "Custom",
"customStrategy": {
"image": "dh",
"exposeDockerSocket": true,
"env": [{
"VARIABLE": {"whatever": "asd"}
}]
}
},
"output": {
"imageTag": "built-image",
"registry": "172.17.42.1:5000"
},
},
"labels": {
"name": "some-label"
}
}
]
} Steps $ o process -f wrong-build.json | o apply -f -
I0109 08:53:52.154938 19252 apply.go:59] Creation succeeded for BuildConfig with name the-build2
$ o start-build the-build2
f5e16698-9806-11e4-9911-fa163ed7ae77
$ o build-logs f5e16698-9806-11e4-9911-fa163ed7ae77
{
"kind": "Status",
"creationTimestamp": null,
"apiVersion": "v1beta1",
"status": "Failure",
"message": "No such pod: pod \"build-f5e16698-9806-11e4-9911-fa163ed7ae77\" not found",
"code": 500
} |
This is hard because of the existing JSON parser in golang (which runs in forgiving / drop-unrecognized fields mode). We need to track this in Kube, figure out a story, then implement it. |
It's important too to distinguish between fields that don't have the format we expect (which should be an error) vs fields that we don't recognize at all, which we must ignore. |
This is tracked by upstream kubernetes/kubernetes#3338 |
…corect-ref Merged by openshift-bot
* Add LastTransitionTime to API conditions * Regenerate code
The invalid configuration results in a build that can't be run. However, it should be caught before the BuildConfig is accepted.
The text was updated successfully, but these errors were encountered: