rht-labs / labs-ci-cd

👻UNMAINTAINED - A collection of Red Hat Open Innovation Labs CI/CD components
Apache License 2.0
101 stars 70 forks source link

fixes apiVersion for hoverfly #156

Closed literalice closed 6 years ago

literalice commented 6 years ago

I ran into a error on running ./run.sh: Object 'apiVersion' is missing in 'object has no apiVersion field'.

sherl0cks commented 6 years ago

@literalice thanks for submitting this change! Can you post the full log from the failure? Also, what does your OpenShift setup look like? All the objects in https://github.com/rht-labs/labs-ci-cd/blob/master/openshift-templates/hoverfly/template.yaml appear to have apiVersion, but I've heard about some issues in OpenShift 3.9 related to apiVersion

literalice commented 6 years ago

Thank you for the reply!

The error I got is here.

TASK [openshift-applier : Apply OpenShift objects based on static files for 'ci-cd-deployments : hoverfly'] *******************************************************************************************
skipping: [localhost]

TASK [openshift-applier : Apply OpenShift objects based on template with params for 'ci-cd-deployments : hoverfly'] ***********************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "oc process  --local   -f  /tmp/src/inventory/../openshift-templates/hoverfly/template.yaml -n labs-ci-cd --param-file=/tmp/src/inventory/../params/hoverfly/deploy | oc apply -n labs-ci-cd -f - ", "delta": "0:00:00.806662", "end": "2018-04-09 21:04:33.035793", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2018-04-09 21:04:32.229131", "stderr": "error: unable to get type info from the object \"*unstructured.Unstructured\": Object 'apiVersion' is missing in 'object has no apiVersion field'", "stderr_lines": ["error: unable to get type info from the object \"*unstructured.Unstructured\": Object 'apiVersion' is missing in 'object has no apiVersion field'"], "stdout": "", "stdout_lines": []}

RUNNING HANDLER [openshift-applier : Clean-up temporary dep dir] **************************************************************************************************************************************
    to retry, use: --limit @/tmp/src/galaxy/openshift-applier/playbooks/openshift-cluster-seed.retry

PLAY RECAP ********************************************************************************************************************************************************************************************
localhost                  : ok=213  changed=17   unreachable=0    failed=1   

After apply the PR, the error was fixed.

literalice commented 6 years ago

I've created a OpenShift cluster on AWS (master 1, infra 1, compute * 1) using version v3.9.14.

sherl0cks commented 6 years ago

Thank you! Interestingly looks like an oc version thing, where newer versions of the client don't like the case issue you found. Good catch and thanks for the bug fix!.

sherl0cks commented 6 years ago

@oybed FYI - this is something CI should be catching. I temporarily enabled our Jenkins master as an admin until we have a more general purpose solution.

@pcarney8 we need to get that solution you had for HF somewhere we can use to set up CI for this repo.