Skip to content

HTTP transport functions for fwprovider#13496

Merged
NickElliot merged 9 commits into
GoogleCloudPlatform:FEATURE-BRANCH-plugin-frameworkfrom
NickElliot:httpfwprovider
Apr 8, 2025
Merged

HTTP transport functions for fwprovider#13496
NickElliot merged 9 commits into
GoogleCloudPlatform:FEATURE-BRANCH-plugin-frameworkfrom
NickElliot:httpfwprovider

Conversation

@NickElliot
Copy link
Copy Markdown
Contributor

@NickElliot NickElliot commented Mar 31, 2025

SendRequest() is largely the same as in transport_tpg, but is updated for "diags" error handling

getProjectFromFrameworkSchema() is updated to a more generalized getProviderDefaultFromFrameworkSchema(), the original function as implemented by Sarah is largely accommodating of this change, "project" as a string being something it needed supplied as an arg rather than being inbuilt to the function

ReplaceVarsRecursive() and related functions have been rewritten to work with the [crud]Request types from plugin framework, relying on interface (type) checking to access the correct values when needed

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@NickElliot NickElliot marked this pull request as draft March 31, 2025 23:05
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 438 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 439 insertions(+), 3 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages

All service packages are affected

🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

@NickElliot NickElliot changed the base branch from main to fwprovider-feature-test April 2, 2025 20:05
@NickElliot NickElliot force-pushed the httpfwprovider branch 2 times, most recently from 5346f4d to cadaeb6 Compare April 3, 2025 21:30
@NickElliot NickElliot changed the base branch from fwprovider-test to main April 3, 2025 21:42
@NickElliot
Copy link
Copy Markdown
Contributor Author

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 588 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 4 files changed, 589 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 4783
Passed tests: 4337
Skipped tests: 439
Affected tests: 7

Click here to see the affected service packages

All service packages are affected

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccLoggingFolderSettings_update
  • TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccLoggingFolderSettings_update [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]
TestAccLoggingFolderSettings_update [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccAccessContextManager [Error message] [Debug log]
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@NickElliot NickElliot requested a review from c2thorn April 4, 2025 18:21
@NickElliot NickElliot marked this pull request as ready for review April 4, 2025 18:21
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 489 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 4 files changed, 490 insertions(+), 4 deletions(-))

1 similar comment
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 489 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 4 files changed, 490 insertions(+), 4 deletions(-))

Copy link
Copy Markdown
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

seems good on initial pass. Want to add some simple datasource style tests for the data source?

resourcemanager.NewGoogleClientConfigDataSource,
resourcemanager.NewGoogleClientOpenIDUserinfoDataSource,
{{- if ne $.TargetVersionName "ga" }}
resourcemanager.NewGoogleProjectFWDataSource,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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


// Metadata returns the data source type name.
func (d *GoogleProjectFWDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_fwprovider_project"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shall we shorten to something like _fw_project or project_fw? We should probably standardize to something for now. Sarah had https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/fwprovider/data_source_provider_config_plugin_framework.go#L58, but that feels different enough

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 329 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 2 files changed, 329 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 4783
Passed tests: 4338
Skipped tests: 439
Affected tests: 6

Click here to see the affected service packages

All service packages are affected

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 4783
Passed tests: 4337
Skipped tests: 439
Affected tests: 7

Click here to see the affected service packages

All service packages are affected

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccLoggingFolderSettings_update
  • TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccLoggingFolderSettings_update [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]
TestAccLoggingFolderSettings_update [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccAccessContextManager [Error message] [Debug log]
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAccessContextManager [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]
TestAccManagedKafkaConnectCluster_managedkafkaConnectClusterBasicExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 4785
Passed tests: 4340
Skipped tests: 441
Affected tests: 4

Click here to see the affected service packages

All service packages are affected

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccLoggingFolderSettings_update

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccLoggingFolderSettings_update [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]
TestAccLoggingFolderSettings_update [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@NickElliot NickElliot changed the base branch from main to fwprovider-test April 7, 2025 16:15
@NickElliot
Copy link
Copy Markdown
Contributor Author

/gcbrun

@NickElliot NickElliot changed the base branch from fwprovider-test to FEATURE-BRANCH-plugin-framework April 7, 2025 17:01
@NickElliot
Copy link
Copy Markdown
Contributor Author

/gcbrun

@c2thorn c2thorn self-requested a review April 7, 2025 17:12
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 329 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 2 files changed, 329 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 4788
Passed tests: 4337
Skipped tests: 446
Affected tests: 5

Click here to see the affected service packages

All service packages are affected

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAccessContextManager
  • TestAccCloudbuildWorkerPool_basic
  • TestAccDNSRecordSet_routingPolicy
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccLoggingFolderSettings_update

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAccessContextManager [Debug log]
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccLoggingFolderSettings_update [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]
TestAccLoggingFolderSettings_update [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccCloudbuildWorkerPool_basic [Error message] [Debug log]
TestAccDNSRecordSet_routingPolicy [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Copy Markdown
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

failing tests already fail in nightlies

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.

3 participants