Skip to content

test(tfacc): wire RDS DB + cluster parameter groups + fix round-trip fidelity#1947

Merged
vieiralucas merged 1 commit into
mainfrom
worktree-tfacc-rds-batch2
Jun 25, 2026
Merged

test(tfacc): wire RDS DB + cluster parameter groups + fix round-trip fidelity#1947
vieiralucas merged 1 commit into
mainfrom
worktree-tfacc-rds-batch2

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

Second batch of the RDS acceptance-tree expansion. Un-defers RDS parameter groups, which were explicitly held out of tfacc with a note about a "Modify-then-Describe round-trip [that] returns empty parameters/groups." This roots out that discrepancy and the related ones the upstream suite surfaces.

New rds-param-groups shard running _basic for:

  • TestAccRDSParameterGroup
  • TestAccRDSClusterParameterGroup

Fidelity fixes:

  • ApplyMethod round-trip. DB and cluster parameters now preserve and return each parameter's ApplyMethod (immediate / pending-reboot). The Terraform provider defaults apply_method = "immediate" and produced a perpetual plan diff because DescribeDB(Cluster)Parameters omitted the field. Stored per-parameter via a backward-compatible #[serde(default)] map (DB groups) and a sibling JSON map (cluster groups).
  • Reset actually resets. ResetDBParameterGroup / ResetDBClusterParameterGroup were no-ops. They now drop the named parameters — or all of them with ResetAllParameters=true — from the user-set map, so a parameter removed from config flips its source back to engine-default. Previously the "parameter no longer user defined" check failed after a parameter was removed.
  • Cluster describe wire shape. DescribeDBClusterParameterGroups wrapped elements in the generic <member> tag, which made the AWS SDK unmarshal an empty list ("empty result" on read). It now uses the named <DBClusterParameterGroup> member tag (matching the working DB-subnet/DB-parameter-group paths), honors the DBClusterParameterGroupName filter, returns DBParameterGroupNotFound for an unknown group, and includes <Description>.

The stale deferral comment on the rds Service entry is updated to reflect that parameter groups are now wired (option groups remain deferred; DB instances/clusters still need Docker).

Test plan

  • Both families pass locally against a fresh fakecloud server, and end-to-end through the harness shard (cargo test -p fakecloud-tfacc --test acc rds_param_groups_acceptance — 1 passed, 127s):
    • TestAccRDSParameterGroup_basic PASS (was: perpetual diff, then reset check)
    • TestAccRDSClusterParameterGroup_basic PASS (was: empty-result on read)
  • cargo test -p fakecloud-rds — 222 passed
  • cargo clippy -p fakecloud-rds -p fakecloud-tfacc --all-targets -- -D warnings clean; cargo fmt applied.

Surface check

  • No new public API / introspection endpoint — these are existing RDS query-protocol response fields, so no first-party SDK change.
  • DbParameterGroup gained a #[serde(default)] parameter_apply_methods map; cluster groups store apply methods in a sibling JSON key — both back-compatible with older persisted snapshots. CFN provisioner ctor updated for the new field.
  • tfacc service list in docs/about/conformance.md unchanged: rds already listed; this deepens resource coverage within it.

Follow-on batches

RDS option groups (separate failure), event subscriptions and global clusters (provider panic on read — need their own investigation), then the Lambda tree.


Summary by cubic

Enables RDS DB and cluster parameter groups in fakecloud-tfacc and fixes the Modify/Describe round-trip so Terraform no longer drifts. ApplyMethod now round-trips, resets work, and cluster group listing matches AWS.

  • New Features

    • Add rds-param-groups shard to run TestAccRDSParameterGroup_basic and TestAccRDSClusterParameterGroup_basic.
  • Bug Fixes

    • Preserve ApplyMethod for DB and cluster parameters; DescribeDB(Cluster)Parameters now includes it.
    • Make ResetDB(Cluster)ParameterGroup clear named or all parameters (and apply methods) to restore engine-default.
    • Fix DescribeDBClusterParameterGroups to use the <DBClusterParameterGroup> member tag, honor name filtering, include <Description>, and return DBParameterGroupNotFound for unknown groups.

Written for commit 300f788. Summary will update on new commits.

Review in cubic

…fidelity

Un-defers RDS parameter groups (previously held out of tfacc for a
Modify-then-Describe round-trip discrepancy). New rds-param-groups shard
runs TestAccRDSParameterGroup_basic and TestAccRDSClusterParameterGroup_basic;
CI matrix picks it up via the tfacc_shards bin.

Fidelity fixes the upstream suite surfaced:
- DB & cluster parameters now round-trip ApplyMethod (immediate /
  pending-reboot). The provider defaults apply_method to "immediate" and
  drifted on every plan because DescribeDB(Cluster)Parameters omitted the
  field. Stored per-parameter (backward-compatible #[serde(default)] map for
  DB groups; sibling map for cluster groups).
- ResetDBParameterGroup / ResetDBClusterParameterGroup now actually reset:
  they drop the named parameters (or all, with ResetAllParameters=true) from
  the user-set map so the parameter's source flips back to engine-default.
  Both were previously no-ops, failing the "parameter no longer user defined"
  check after a parameter was removed from config.
- DescribeDBClusterParameterGroups now wraps each element in the named
  <DBClusterParameterGroup> member tag (not the generic <member>), honors the
  DBClusterParameterGroupName filter, returns DBParameterGroupNotFound for an
  unknown group, and includes <Description>. The generic <member> wrapper made
  the AWS SDK unmarshal an empty list ("empty result" on read).
@vieiralucas vieiralucas merged commit 64dae43 into main Jun 25, 2026
71 checks passed
@vieiralucas vieiralucas deleted the worktree-tfacc-rds-batch2 branch June 25, 2026 20:50
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.

1 participant