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 #104

Closed
flaky-bot bot opened this issue Oct 29, 2020 · 4 comments · Fixed by #108
Closed

samples.snippets.quickstart_searchallresources_test: test_search_all_resources failed #104

flaky-bot bot opened this issue Oct 29, 2020 · 4 comments · Fixed by #108
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 Oct 29, 2020

Note: #75 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: b112f29
buildURL: Build Status, Sponge
status: failed

Test output
asset_dataset = 'dataset_7df1a602b1ea49129966874e6e1e78d8'
capsys = <_pytest.capture.CaptureFixture object at 0x7fa54682bdc0>
@pytest.mark.flaky(max_runs=3, min_passes=1)
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:63:


.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_7df1a602b1ea49129966874e6e1e78d8' in ''

quickstart_searchallresources_test.py:61: AssertionError

@flaky-bot flaky-bot bot added buildcop: issue 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. labels Oct 29, 2020
@product-auto-label product-auto-label bot added api: cloudasset Issues related to the googleapis/python-asset API. samples Issues that are directly related to samples. labels Oct 29, 2020
@flaky-bot
Copy link
Author

flaky-bot bot commented Oct 30, 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 (b112f29), 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 Nov 4, 2020
@tmatsuo tmatsuo self-assigned this Nov 6, 2020
@tmatsuo
Copy link
Contributor

tmatsuo commented Nov 6, 2020

@dansanche The CODEOWNER says the owner is you. Can you take a look?

tmatsuo pushed a commit that referenced this issue Nov 6, 2020
tmatsuo pushed a commit that referenced this issue Nov 12, 2020
* testing(sample): fix broken tests

fixes #104
fixes #105

* explicitly specify the project id on bucket creation

longer timeout
@flaky-bot
Copy link
Author

flaky-bot bot commented Nov 13, 2020

Oops! Looks like this issue is still flaky. It failed again. 😬

I reopened the issue, but a human will need to close it again.


commit: dcaf375
buildURL: Build Status, Sponge
status: failed

Test output
asset_dataset = 'dataset_e781e6defb5e48fbbe31d4790b866de7'
capsys = <_pytest.capture.CaptureFixture object at 0x7f8207364ef0>
@pytest.mark.flaky(max_runs=3, min_passes=1)
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:63:


.nox/py-3-6/lib/python3.6/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_e781e6defb5e48fbbe31d4790b866de7' in ''

quickstart_searchallresources_test.py:61: AssertionError

@flaky-bot flaky-bot bot reopened this Nov 13, 2020
@tmatsuo
Copy link
Contributor

tmatsuo commented Nov 13, 2020

We bumped the timeout to 240, so this failure is before the bump, closing.

@tmatsuo tmatsuo closed this as completed Nov 13, 2020
@googleapis googleapis locked as resolved and limited conversation to collaborators Nov 13, 2020
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.

2 participants