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

Set PREFECT_API_URL correctly during tests #5379

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

LucasG0
Copy link
Contributor

@LucasG0 LucasG0 commented Jan 6, 2025

Avoid running into RuntimeError: Timed out while attempting to connect to ephemeral Prefect API server. while testing locally.

@LucasG0 LucasG0 requested a review from a team January 6, 2025 10:35
@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Jan 6, 2025
@LucasG0 LucasG0 marked this pull request as draft January 6, 2025 10:37
@LucasG0 LucasG0 force-pushed the lgu-fix-test-prefect-server branch from e07159a to e4f97d6 Compare January 6, 2025 10:40
Copy link

codspeed-hq bot commented Jan 6, 2025

CodSpeed Performance Report

Merging #5379 will not alter performance

Comparing lgu-fix-test-prefect-server (0378e33) with stable (9ec036d)

Summary

✅ 10 untouched benchmarks

@ogenstad
Copy link
Contributor

ogenstad commented Jan 7, 2025

LGTM, but we're getting some scope mismatch on the fixtures so perhaps we need additional fixtures named after the scope.

@LucasG0 LucasG0 force-pushed the lgu-fix-test-prefect-server branch from e4f97d6 to cd4e0a7 Compare January 8, 2025 14:18
@LucasG0 LucasG0 force-pushed the lgu-fix-test-prefect-server branch from cd4e0a7 to 0378e33 Compare January 16, 2025 11:01
@LucasG0 LucasG0 marked this pull request as ready for review January 16, 2025 13:49

container.start()
wait_for_logs(container, "Configure Prefect to communicate with the server")
request.addfinalizer(cleanup)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the request.addfinalizer work in the same way when this function isn't a fixture? I'm not sure just wondering if the fixture decorator adds anything around this or if it's managed through the request object itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess fixture decorator checks request object state when fixture function scope ends. So whereever we are mutating this object should not matter

@LucasG0 LucasG0 merged commit 5e914b2 into stable Jan 17, 2025
35 checks passed
@LucasG0 LucasG0 deleted the lgu-fix-test-prefect-server branch January 17, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants