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

Make integrations tests more stable #301

Closed
vdusek opened this issue Oct 21, 2024 · 2 comments · Fixed by #311
Closed

Make integrations tests more stable #301

vdusek opened this issue Oct 21, 2024 · 2 comments · Fixed by #311
Assignees
Labels
infrastructure Issues related to infrastructure or CI/CD pipeline. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@vdusek
Copy link
Contributor

vdusek commented Oct 21, 2024

Our integration tests are highly unstable, often requiring multiple attempts to pass. Below are the two main issues we are encountering...

Issues during Actor creation

The first problem occurs when creating an Actor in conftest/make_actor (conftest.py#L247):

    ...
    build = await actor_client.build(version_number='0.0', wait_for_finish=300)
    assert build['status'] == ActorJobStatus.SUCCEEDED

The test frequently fails with the following assertion error:

>       assert build['status'] == ActorJobStatus.SUCCEEDED
E       AssertionError: assert 'READY' == <ActorJobStat...: 'SUCCEEDED'>
E         
E         - SUCCEEDED
E         + READY

Issues during Actor execution

Another common issue arises when checking the Actor's run status in the integration tests:

    ...
    run_result = await actor.call()
    assert run_result is not None
    assert run_result['status'] == 'SUCCEEDED'

Here, the test often fails with a similar mismatch in the expected status:

>       assert build['status'] == ActorJobStatus.SUCCEEDED
E       AssertionError: assert 'READY' == <ActorJobStat...: 'SUCCEEDED'>
E         
E         - SUCCEEDED
E         + READY
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 21, 2024
@vdusek
Copy link
Contributor Author

vdusek commented Oct 21, 2024

See the timeout=60 in https://docs.apify.com/api/v2#tag/ActorsRun-collection/operation/act_runs_post ... it could be related.

From Apify client:

wait_for_finish: The maximum number of seconds the server waits for the build to finish before returning. 
    By default it is 0, the maximum value is 60.

@vdusek
Copy link
Contributor Author

vdusek commented Oct 25, 2024

Revert changes in #306 once this is done.

vdusek added a commit that referenced this issue Oct 29, 2024
@vdusek vdusek added the infrastructure Issues related to infrastructure or CI/CD pipeline. label Oct 29, 2024
@vdusek vdusek added this to the 101st sprint - Tooling team milestone Oct 29, 2024
@vdusek vdusek closed this as completed in 80a2a7f Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues related to infrastructure or CI/CD pipeline. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant