Skip to content
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

github.com/openshift/origin/test/cmd/observe test/cmd/observe.sh:34: executing 'oc observe services --once --all-namespaces -a "bad{ .metadata.annotations.unset }key" --strict-templates' expecting failure and text 'annotations is not found' #17811

Closed
gabemontero opened this issue Dec 14, 2017 · 8 comments
Assignees
Labels
kind/post-rebase kind/test-flake Categorizes issue or PR as related to test flakes. priority/P1 sig/master

Comments

@gabemontero
Copy link
Contributor

gabemontero commented Dec 14, 2017

https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/17717/test_pull_request_origin_cmd/7451/

=== BEGIN TEST CASE ===
test/cmd/observe.sh:34: executing 'oc observe services --once --all-namespaces -a "bad{ .metadata.annotations.unset }key" --strict-templates' expecting failure and text 'annotations is not found'
FAILURE after 0.322s: test/cmd/observe.sh:34: executing 'oc observe services --once --all-namespaces -a "bad{ .metadata.annotations.unset }key" --strict-templates' expecting failure and text 'annotations is not found': the output content test failed
Standard output from the command:
# 2017-12-14T15:13:01Z Sync started

Standard error from the command:
error: unable to write arguments: error executing template 'bad{ .metadata.annotations.unset }key': 'unset is not found'
----data----
map[kind:Service apiVersion:v1 metadata:map[annotations:map[service.alpha.kubernetes.io/tolerate-unready-endpoints:true] name:galera namespace:default selfLink:/api/v1/namespaces/default/services/galera uid:5ee8d7ac-e0df-11e7-8591-0242ac110002 resourceVersion:1446 creationTimestamp:2017-12-14T14:59:23Z labels:map[app:mysql]] spec:map[clusterIP:None type:ClusterIP sessionAffinity:None ports:[map[targetPort:3306 name:mysql protocol:TCP port:3306]] selector:map[app:mysql]] status:map[loadBalancer:map[]]]
=== END TEST CASE ===

Seems like a rebase kind of thing, but did not investigate in detail. Re-categorize if needed please.

Marking as test flake as well, but did not see if it happens consistently locally.

@bparees bparees changed the title [cmd test] unexpected response: oc observe services --once --all-namespaces -a "bad{ .metadata.annotations.unset }key" --strict-templates github.com/openshift/origin/test/cmd/observe test/cmd/observe.sh:34: executing 'oc observe services --once --all-namespaces -a "bad{ .metadata.annotations.unset }key" --strict-templates' expecting failure and text 'annotations is not found' Jan 11, 2018
@bparees
Copy link
Contributor

bparees commented Jan 11, 2018

@mfojtik who's investigating this flake? what have they discovered so far?

@mfojtik
Copy link
Contributor

mfojtik commented Jan 12, 2018

/assign deads2k

@mfojtik
Copy link
Contributor

mfojtik commented Jan 12, 2018

/assign @ironcladlou

@ironcladlou
Copy link
Contributor

@bparees

who's investigating this flake? what have they discovered so far?

I just discovered that I'm investigating

@ironcladlou
Copy link
Contributor

Add an annotation to a service, like services/kubernetes: service.alpha.kubernetes.io/tolerate-unready-endpoints=true, then run:

oc observe services --once --all-namespaces -a "bad{ .metadata.annotations.unset }key" --strict-templates

and the error is reproduced. I assume because annotations exists, but the unset key doesn't, causing the error to not match the test's expectation.

Seems like the test case should tolerate objects with both missing and empty annotation field?

@juanvallejo
Copy link
Contributor

@ironcladlou

Seems like the test case should tolerate objects with both missing and empty annotation field?

I agree, the test should be updated to tolerate both cases

openshift-merge-robot added a commit that referenced this issue Jan 15, 2018
Automatic merge from submit-queue (batch tested with PRs 18040, 18097, 18098, 18106, 18087).

Stabilize observe test

Stabilize the observe cmd test by removing the assumption that all services lack
annotations.

Fixes #17811.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/post-rebase kind/test-flake Categorizes issue or PR as related to test flakes. priority/P1 sig/master
Projects
None yet
Development

No branches or pull requests

6 participants