Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

samples.snippets.quickstart_searchallresources_test: test_search_all_resources failed #75

Closed
flaky-bot bot opened this issue Aug 20, 2020 · 2 comments · Fixed by #81
Closed

samples.snippets.quickstart_searchallresources_test: test_search_all_resources failed #75

flaky-bot bot opened this issue Aug 20, 2020 · 2 comments · Fixed by #81
Assignees
Labels
api: cloudasset Issues related to the googleapis/python-asset API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Aug 20, 2020

This test failed!

To configure my behavior, see the Build Cop Bot documentation.

If I'm commenting on this issue too often, add the buildcop: quiet label and
I will stop commenting.


commit: 4d57792
buildURL: Build Status, Sponge
status: failed

Test output
asset_dataset = 'dataset_6e92f46c6ed14102859892ce8809cfe8'
capsys = <_pytest.capture.CaptureFixture object at 0x7f4471b6a970>
def test_search_all_resources(asset_dataset, capsys):
    scope = "projects/{}".format(PROJECT)
    query = "name:{}".format(DATASET)

    # Dataset creation takes some time to propagate, so the dataset is not
    # immediately searchable. Need some time before the snippet will pass.
    @backoff.on_exception(backoff.expo, (AssertionError), max_time=120)
    def eventually_consistent_test():
        quickstart_searchallresources.search_all_resources(scope, query=query)
        out, _ = capsys.readouterr()

        assert DATASET in out
  eventually_consistent_test()

quickstart_searchallresources_test.py:62:


.nox/py-3-8/lib/python3.8/site-packages/backoff/_sync.py:94: in retry
ret = target(*args, **kwargs)


@backoff.on_exception(backoff.expo, (AssertionError), max_time=120)
def eventually_consistent_test():
    quickstart_searchallresources.search_all_resources(scope, query=query)
    out, _ = capsys.readouterr()
  assert DATASET in out

E AssertionError: assert 'dataset_6e92f46c6ed14102859892ce8809cfe8' in ''

quickstart_searchallresources_test.py:60: AssertionError

@flaky-bot flaky-bot bot added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. buildcop: issue labels Aug 20, 2020
@product-auto-label product-auto-label bot added the api: cloudasset Issues related to the googleapis/python-asset API. label Aug 20, 2020
@flaky-bot
Copy link
Author

flaky-bot bot commented Aug 21, 2020

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (4d57792), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Aug 26, 2020
@JustinBeckwith JustinBeckwith added the samples Issues that are directly related to samples. label Sep 2, 2020
@tmatsuo
Copy link
Contributor

tmatsuo commented Sep 3, 2020

This is a typical eventually consistent test. Now we have 120 seconds and pretty good success rate (+90%).
Let's mark this test with flaky and retry 3 times.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: cloudasset Issues related to the googleapis/python-asset API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants