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

Cmd test fails "oc delete all -l app=testapp2" #19588

Closed
adambkaplan opened this issue May 2, 2018 · 3 comments
Closed

Cmd test fails "oc delete all -l app=testapp2" #19588

adambkaplan opened this issue May 2, 2018 · 3 comments
Assignees
Labels
kind/test-flake Categorizes issue or PR as related to test flakes. sig/developer-experience

Comments

@adambkaplan
Copy link
Contributor

Test flake in cmd tests - the "delete all" test seems to fail, potentially because the application under test has already been deleted.

Version

v3.10.0-alpha0

Current Result

Test failure: github.com/openshift/origin/test/cmd/newapp test/cmd/newapp.sh:428: executing 'oc delete all -l app=testapp2' expecting success 1.66s

Expected Result

Test passes.

Additional Information

Failed test: https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/19532/test_pull_request_origin_cmd/13227/
Logs:

=== BEGIN TEST CASE ===
test/cmd/newapp.sh:428: executing 'oc delete all -l app=testapp2' expecting success
FAILURE after 1.658s: test/cmd/newapp.sh:428: executing 'oc delete all -l app=testapp2' expecting success: the command returned the wrong error code
Standard output from the command:
deploymentconfig.apps.openshift.io "testapp2" deleted
buildconfig.build.openshift.io "testapp2" deleted
imagestream.image.openshift.io "testapp2" deleted

Standard error from the command:
Error from server (NotFound): builds.build.openshift.io "testapp2-1" not found
=== END TEST CASE ===
@jwforres
Copy link
Member

jwforres commented May 2, 2018

@openshift/sig-developer-experience

@bparees
Copy link
Contributor

bparees commented May 2, 2018

this is really an issue w/ how oc delete operates, what is happening is the buildconfig is deleted which triggers reaping (GC i think?) of the builds. Regardless, oc delete has already grabbed the list of builds while it still existed, and then when it tries to delete it, finds it is already deleted.

there is already an open issue for this, hopefully @soltysh or @juanvallejo know where it is (they own it).

That said, we can make the test more robust by explicitly deleting the resources we created, rather than "all". @adambkaplan can you make that change and close this issue w/ the PR?

(I think getting oc delete fixed is blocked by upstream, but the correct behavior imho would be to ignore or warn when trying to delete things that are already gone, not error)

adambkaplan added a commit to adambkaplan/origin that referenced this issue May 3, 2018
* Addresses timing issues with reap/GC on build objects
* Explicit deletes for services, dc, bc, and imagestreams

Fixes openshift#19588
@deads2k
Copy link
Contributor

deads2k commented May 8, 2018

I accidentally fixed this in #19616

@deads2k deads2k closed this as completed May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/test-flake Categorizes issue or PR as related to test flakes. sig/developer-experience
Projects
None yet
Development

No branches or pull requests

5 participants