test: add unit tests and terraform configs for post-rc4 features - #298
Draft
Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Draft
test: add unit tests and terraform configs for post-rc4 features#298Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Conversation
- Go unit tests for MoveState helpers (extractJSONString, extractJSONTypesString, extractJSONInt64) - Go unit tests verifying MoveState interface implementation for Source and Destination - Terraform test project: pardot source without v5_page_size (validates no default sent) - Terraform test project: typed-to-generic move workflow (step1: typed, step2: moved) Co-Authored-By: AJ Steers <aj@airbyte.io>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Thanks for opening this pull request!Your contribution is appreciated. Here are some helpful tips and resources. 💡 Show Tips and TricksTerraform Example Commands
📚 Show Repo GuidanceAbout This RepositoryThis repository uses Speakeasy to generate the Terraform provider from the Airbyte OpenAPI specification. The CI will automatically build the provider, validate code generation, and run acceptance tests across Terraform versions 1.0-1.4. Note: This is a generated codebase. Direct modifications to generated files are not accepted - changes must be made to the upstream OpenAPI spec. |
…iccheck Co-Authored-By: AJ Steers <aj@airbyte.io>
…lues Co-Authored-By: AJ Steers <aj@airbyte.io>
…plan verification Co-Authored-By: AJ Steers <aj@airbyte.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Go unit tests, Terraform test project configurations, and a migration guide improvement to validate and document the two major features added since
v1.0.0-rc4:Pardot
v5_page_sizefix —terraform planwith the pardot test config confirmsv5_page_sizeno longer appears as a computed default. Previously it would forcev5_page_size = 1000even when omitted.MoveStatetyped-to-generic migration — Go tests verify the helper functions and interface implementation. Terraform configs provide a two-step workflow (step1: deploy typed resources, step2: migrate viamovedblocks to genericairbyte_source/airbyte_destination).Migration guide improvement — Updated
docs/MIGRATION_GUIDE.mdwith a critical warning aboutdefinition_idmatching: using the wrong ID silently triggersforces replacementinstead of a clean move. Added concreteterraform state show | grep definition_idcommand and clearer plan verification criteria. This was discovered during E2E testing when incorrectdefinition_idvalues caused force-replacement instead of moves.E2E verification completed against Airbyte Cloud
The full move workflow was run end-to-end against the Devin sandbox workspace (
266ebdfe-0d7b-4540-9817-de7e4505ba61):terraform applycreated typed resources (airbyte_source_faker,airbyte_destination_dev_null,airbyte_connection)terraform planwithmovedblocks showed:Known issue encountered (pre-existing, not introduced here):
airbyte_connectionreturns unknown values forschedule.basic_timingandschedule.cron_expressionafter apply, which taints the resource. Root cause: the generatedRefreshFromSharedConnectionResponseonly populates schedule fields whenr.Schedule == nil, so user-provided schedule configs cause the API response values to be silently dropped. This caused the connection to be recreated during step 2, but the source and destination moves worked correctly.What was verified locally (in addition to E2E):
go test ./internal/provider/ -run "TestExtract|TestMoveState")terraform validatesucceeds for all 3 configs using a locally-built provider binaryterraform planon the pardot config confirmsv5_page_sizeis absent from the planned configurationUpdates since last revision
docs/MIGRATION_GUIDE.mdwith a prominent warning aboutdefinition_idmatching, a concreteterraform state showcommand, and clearer plan verification criteria (look forhas moved to, watch forforces replacement).definition_idvalues instep2-generic/main.tfto match actual Airbyte Cloud registry values (faker:dfd88b22-b603-4c3d-aad7-3701784586b1, dev-null:a7bcc9d8-13b3-4e49-b80d-d020b90045e3). The original values were incorrect and caused force-replacement instead of clean moves.staticchecklint error: replacednilcontext withcontext.Background()in test calls toMoveState().Review & Testing Checklist for Human
docs/MIGRATION_GUIDE.mdupdates add a critical warning aboutdefinition_idmatching. Verify the wording is clear and theterraform state show | grep definition_idcommand is the right approach.terraform planlevel (no real Pardot OAuth credentials available). A reviewer with Pardot access shouldterraform applythev1-pardot-no-page-sizeconfig and confirm no 422/validation errors from phantom default values.airbyte_connectionresource has a bug whereschedule.basic_timingandschedule.cron_expressionremain unknown after apply. This is unrelated to this PR but affects the test workflow. Consider filing a separate issue.Suggested end-to-end test plan
Notes