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

Refactor muxing 1 : Re-use same config to configure the SDK and PF providers, fix VCR testing #11577

Conversation

SarahFrench
Copy link
Collaborator

@SarahFrench SarahFrench commented Aug 29, 2024

Replaced by #11903

provider: refactored how the provider configuration is handled internally

@SarahFrench
Copy link
Collaborator Author

There are lots of code deletions I can do as a result of this change, but I'll split that into a separate PR for clarity.

@SarahFrench SarahFrench changed the title Refactor muxing: Re-use same config to configure the SDK and PF providers, fix VCR testing Refactor muxing 1 : Re-use same config to configure the SDK and PF providers, fix VCR testing Aug 29, 2024
@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@SarahFrench
Copy link
Collaborator Author

I'll fix the unused import after the test run finishes- I want to see the outcome and each push delays it!

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@SarahFrench
Copy link
Collaborator Author

Rebased to include Go rewrtie

@SarahFrench
Copy link
Collaborator Author

Just rebased to pull in the latest changes from main, including new acc tests for how the provider is configured

@SarahFrench SarahFrench force-pushed the mux-refactor-4-reuse-sdk-config branch from 3a81730 to eeff5dd Compare October 2, 2024 22:05
@modular-magician

This comment has been minimized.

1 similar comment
@modular-magician

This comment has been minimized.

@modular-magician

This comment has been minimized.

@modular-magician

This comment has been minimized.

@modular-magician
Copy link
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 ( 15 files changed, 157 insertions(+), 179 deletions(-))
google-beta provider: Diff ( 21 files changed, 201 insertions(+), 222 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4138
Passed tests: 3721
Skipped tests: 411
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
  • TestAccDataformRepositoryReleaseConfig_dataformRepositoryReleaseConfigExample
  • TestAccDataformRepositoryWorkflowConfig_dataformRepositoryWorkflowConfigExample
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataformRepository_updated
  • TestAccDataprocCluster_withAutoscalingPolicy
  • TestAccFrameworkProviderBasePath_setBasePath

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccFrameworkProviderBasePath_setBasePath[Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccDataformRepositoryReleaseConfig_dataformRepositoryReleaseConfigExample[Error message] [Debug log]
TestAccDataformRepositoryWorkflowConfig_dataformRepositoryWorkflowConfigExample[Error message] [Debug log]
TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample[Error message] [Debug log]
TestAccDataformRepository_updated[Error message] [Debug log]
TestAccDataprocCluster_withAutoscalingPolicy[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

@SarahFrench
Copy link
Collaborator Author

I'm going to re-make this PR, as it was a bit messy to start but rebases to pull in Go rewrite and new acc tests have made the PR history too long for good review. I'll re-open a new PR with a cleaner commit history

…ruct

This allows the PF provider to access any data on the SDK provider, including the meta/Config struct that will be created when the SDK provider is configured.
…struct to all data sources and resources, instead of `FrameworkProviderConfig`
… Config struct to be usable in those places.

- Replace use of FrameworkProviderConfig with Config
- Add Beta-only `NewFirebaseClient` method to Config struct for use with Firebase data sources
- Update LocationDescriber interface
- Misc places where the SDK and PF type systems meet and string needs to be converted to types.StringType
- This carries over the idea of configuring the PF provider using the SDK provider. The changes in the MuxedProviders func mimic changes already made in main.go.
- Remove unnecessary duplication of cached configs per test name; now one used regardless of PF/SDK
- Updates to some DestroyProducer functions so they access the cached SDK Config struct to get a client
- Remove GetFwTestProvider and the file containing it - this isn't needed.
…ovider-google#14158

- Use of older TPG versions through ExternalProviders breaks VCR, so that is also removed from TestAccDataSourceGoogleFirebaseAppleAppConfig
@SarahFrench SarahFrench force-pushed the mux-refactor-4-reuse-sdk-config branch from 487e570 to f64f805 Compare October 3, 2024 09:05
@SarahFrench SarahFrench closed this Oct 3, 2024
@SarahFrench
Copy link
Collaborator Author

See PR description for replacement PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants