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

Support GPU Droplets in Droplet data sources #1256

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Conversation

andrewsomething
Copy link
Member

@andrewsomething andrewsomething commented Oct 25, 2024

This adds support for GPU Droplets to the digitalocean_droplet and digitalocean_droplets data sources.

$ DO_RUN_GPU_TESTS=1 make testacc TESTARGS='-run=TestAccDataSourceDigitalOceanDroplets'

=== RUN   TestAccDataSourceDigitalOceanDroplets_Basic
=== PAUSE TestAccDataSourceDigitalOceanDroplets_Basic
=== RUN   TestAccDataSourceDigitalOceanDroplets_GPUDroplet
=== PAUSE TestAccDataSourceDigitalOceanDroplets_GPUDroplet
=== CONT  TestAccDataSourceDigitalOceanDroplets_Basic
=== CONT  TestAccDataSourceDigitalOceanDroplets_GPUDroplet
--- PASS: TestAccDataSourceDigitalOceanDroplets_Basic (58.23s)
--- PASS: TestAccDataSourceDigitalOceanDroplets_GPUDroplet (92.15s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean/droplet    92.248s

$ DO_RUN_GPU_TESTS=1 make testacc TESTARGS='-run=TestAccDataSourceDigitalOceanDroplet_'

=== RUN   TestAccDataSourceDigitalOceanDroplet_BasicByName
=== PAUSE TestAccDataSourceDigitalOceanDroplet_BasicByName
=== RUN   TestAccDataSourceDigitalOceanDroplet_GPUByName
=== PAUSE TestAccDataSourceDigitalOceanDroplet_GPUByName
=== RUN   TestAccDataSourceDigitalOceanDroplet_BasicById
=== PAUSE TestAccDataSourceDigitalOceanDroplet_BasicById
=== RUN   TestAccDataSourceDigitalOceanDroplet_BasicByTag
=== PAUSE TestAccDataSourceDigitalOceanDroplet_BasicByTag
=== CONT  TestAccDataSourceDigitalOceanDroplet_BasicByName
=== CONT  TestAccDataSourceDigitalOceanDroplet_BasicById
--- PASS: TestAccDataSourceDigitalOceanDroplet_BasicByName (43.88s)
=== CONT  TestAccDataSourceDigitalOceanDroplet_BasicByTag
--- PASS: TestAccDataSourceDigitalOceanDroplet_BasicById (58.09s)
=== CONT  TestAccDataSourceDigitalOceanDroplet_GPUByName
--- PASS: TestAccDataSourceDigitalOceanDroplet_BasicByTag (57.50s)
--- PASS: TestAccDataSourceDigitalOceanDroplet_GPUByName (118.77s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean/droplet    176.919s

Due to the expense of spinning up GPU instances and potential flakiness due to capacity fluctuations, I've made the acceptance tests for these require setting an environment variable. By default, they will be skipped.

@andrewsomething andrewsomething requested a review from a team October 25, 2024 18:47
Copy link
Contributor

@loosla loosla left a comment

Choose a reason for hiding this comment

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

👍

@andrewsomething andrewsomething merged commit 8e91e73 into main Oct 25, 2024
3 checks passed
@andrewsomething andrewsomething deleted the asb/list-gpus branch October 25, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants