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

fix: Update CRUD for metal port to support timeouts #377

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

aayushrangwala
Copy link
Contributor

  • Adds support for timeout in Create, update and delete operation.
  • Adds acceptance tests

Fixes #357

@aayushrangwala aayushrangwala force-pushed the timeout-fix-metal-ports branch from 9124341 to a3218e2 Compare September 7, 2023 16:55
@aayushrangwala aayushrangwala temporarily deployed to external September 20, 2023 14:27 — with GitHub Actions Inactive
@aayushrangwala aayushrangwala changed the title Update CRUD for metal port to support timeouts fix: Update CRUD for metal port to support timeouts Sep 20, 2023
@aayushrangwala aayushrangwala temporarily deployed to external September 20, 2023 17:18 — with GitHub Actions Inactive
@aayushrangwala aayushrangwala temporarily deployed to external September 20, 2023 17:19 — with GitHub Actions Inactive
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (973fdaa) 13.73% compared to head (383679e) 60.14%.
Report is 33 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #377       +/-   ##
===========================================
+ Coverage   13.73%   60.14%   +46.40%     
===========================================
  Files           8       98       +90     
  Lines         910    19758    +18848     
===========================================
+ Hits          125    11883    +11758     
- Misses        770     7575     +6805     
- Partials       15      300      +285     
Files Coverage Δ
equinix/data_source_metal_port.go 100.00% <100.00%> (ø)
equinix/data_source_metal_virtual_circuit.go 100.00% <100.00%> (ø)
equinix/fabric_connection_schema.go 100.00% <100.00%> (ø)
equinix/resource_metal_port.go 89.84% <100.00%> (ø)
equinix/resource_metal_reserved_ip_block.go 84.23% <100.00%> (ø)
equinix/resource_metal_vrf.go 86.40% <100.00%> (ø)
equinix/data_source_metal_vrf.go 89.58% <33.33%> (ø)
equinix/resource_metal_virtual_circuit.go 76.57% <86.66%> (ø)
equinix/fabric_mapping_helper.go 0.80% <0.00%> (ø)
equinix/port_helpers.go 77.33% <81.81%> (ø)

... and 80 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ctreatma
Copy link
Contributor

In the latest CI run I see that a bunch of tests are failing due to timeouts right around the 20 minute mark: https://github.com/equinix/terraform-provider-equinix/actions/runs/6251976162/job/16974235659?pr=377#step:5:3981

I'm not clear on whether those timeouts are expected or not, or if we need to increase a default timeout interval somewhere.

@aayushrangwala
Copy link
Contributor Author

In the latest CI run I see that a bunch of tests are failing due to timeouts right around the 20 minute mark: https://github.com/equinix/terraform-provider-equinix/actions/runs/6251976162/job/16974235659?pr=377#step:5:3981

I'm not clear on whether those timeouts are expected or not, or if we need to increase a default timeout interval somewhere.

Yes those are failing but they are not expected to fail. In the terraform resource schema we had 20min default timeout but still it seems thats not enough. Trying to update it with 30m probably

Also, I am not sure a port should take more than 20m or 30m ideally to be created. Since we introduced the usage of the declared timeouts in this PRs, thats what caused the tests for fail

@aayushrangwala aayushrangwala temporarily deployed to external September 21, 2023 14:07 — with GitHub Actions Inactive
@aayushrangwala aayushrangwala temporarily deployed to external September 21, 2023 16:52 — with GitHub Actions Inactive
@aayushrangwala aayushrangwala requested a deployment to external September 22, 2023 14:15 — with GitHub Actions Abandoned
@aayushrangwala
Copy link
Contributor Author

Details

Based on this new test run the metal port timeout specific tests are all passing. Hence it suggests that the overall Acceptances tests may be a bit flaky only sometimes

@ctreatma
Copy link
Contributor

Based on this new test run the metal port timeout specific tests are all passing. Hence it suggests that the overall Acceptances tests may be a bit flaky only sometimes

I see both FAIL: TestAccMetalPortUpdate_hybridBonded_timeout and FAIL: TestAccMetalPortCreate_hybridBonded_timeout in the linked test run, as well as in the previous run.

@aayushrangwala aayushrangwala temporarily deployed to external September 26, 2023 17:49 — with GitHub Actions Inactive
@aayushrangwala
Copy link
Contributor Author

Tests specific to ports are passing now after changing the default timeout to 30 minutes
Screenshot 2023-09-27 at 5 35 44 PM
Screenshot 2023-09-27 at 5 36 38 PM

@ctreatma ctreatma merged commit 97e8ea6 into equinix:main Sep 27, 2023
4 of 5 checks passed
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.

Timeouts are not honored on Metal resources/data sources
4 participants