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

Adds support for cloud-run-v2, modal work pool metadata #279

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

EmilRex
Copy link
Contributor

@EmilRex EmilRex commented Oct 7, 2024

Closes #276

@mitchnielsen
Copy link
Contributor

Thanks so much for the PR @EmilRex! I'll take a look at this today, and in the meantime will kick off the pending tests.

@github-actions github-actions bot added the docs label Oct 7, 2024
@EmilRex
Copy link
Contributor Author

EmilRex commented Oct 7, 2024

For the life of me I cannot figure out why the test is failing... probably overlooking something simple:

=== FAIL: internal/provider/datasources TestAccDatasource_worker_metadata (0.47s)
    worker_metadata_test.go:20: Step 1/1 error: Check failed: Check 13/14 error: data.prefect_worker_metadata.default: Attribute 'base_job_configs.cloud_run_v2_push' expected to be set

@mitchnielsen
Copy link
Contributor

@EmilRex Taking a look into how this works behind the scenes. In the meantime, I wonder if these base job configs aren't set up / available in this environment? These tests use the staging instance in the github-ci-tests account.

@EmilRex
Copy link
Contributor Author

EmilRex commented Oct 7, 2024

Ah, that might be it... I only checked against production to confirm that cloud-run-v2 and cloud-run-v2:push were there.

The endpoint to list the base job configs differs between OSS and Cloud.
This change calculates the correct endpoint, and updates the test to
refer to the specific evergreen workspace used for testing.
@mitchnielsen mitchnielsen deployed to Acceptance Tests October 8, 2024 21:48 — with GitHub Actions Active
@mitchnielsen mitchnielsen changed the title Adds support for cloud-run-v2 work pool metadata Adds support for cloud-run-v2, modal work pool metadata Oct 8, 2024
@mitchnielsen
Copy link
Contributor

Alrighty, should be all set here @EmilRex. Thanks to a tip from @jakekaplan, I updated the endpoint to use based on if the target is OSS or Cloud, which should more closely match what the Prefect client is doing. Tests are now passing and I believe we've enumerated every type there is based on the docs (added a link to those in a comment for future reference).

@mitchnielsen mitchnielsen merged commit e237d13 into main Oct 8, 2024
@mitchnielsen mitchnielsen deleted the worker-metadata-cloud-run-v2 branch October 8, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support cloud_run_v2 for the worker_metadata data source
2 participants