Repository navigation
chore(#1609): name the release-named files by domain - #1667
Merged
Merged
Conversation
Rename and regroup the 28 files named after releases (cfn_resources_v19.go ... v131.go, tagging_scan_v129.go, ec2_v0126_review_test.go and the v129 tests) into cfn_resources_<service>.go, cfn_resource_helpers.go, cfn_update.go and the existing EC2 test files. Pure moves: the set of top-level declarations and their comment-free source is unchanged. Comments that cited the old file names now cite functions. Adds TestFileNames_AreNamedByDomainNotRelease and a contributing.md line.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
v016_extra_test.go and v030_coverage_test.go move into the matching service test files (kms, ssm, sns, sqs, secretsmanager, servicequotas, s3_versioning, dynamodb_streams, lambda_esm, lambda_plugin, cfn_deployer, cfn_intrinsics, cfn_getatt_coverage). The guard now refuses (^|_)v[0-9], so a file that starts with a version is caught too.
This was referenced Nov 24, 2026
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.
Part of #1609 — this is part 1 (release-named files). Part 2 (the comment rule, gates and trims) is W3's PR; part 3 (tagging behind a plugin interface) follows as
refactor/v0132-tagging-providers, stacked on this branch.emulator/are renamed or regrouped by domain: the 28 matching_v[0-9], plusv016_extra_test.goandv030_coverage_test.go. No logic changes.TestFileNames_AreNamedByDomainNotReleasefails on anyemulator/*.goname matching(^|_)v[0-9].cfn_resource_tags.go'sfile:linecites, which were already stale:cfn_resources_v21.go:196and:241both pointed intodeployECSTaskDefinition. They now namedeployECSServiceanddeployECSTaskDefinition, and the Config pair namescfgsvcCFNRuleAttributesandcfgsvcCFNRecorderARN. Each old file header ("The name records the substrate release…") is replaced by a one-line domain header. The----- v0.NN.0 — X -----separators lose their release number. The cross-cutting header ofv129(the three rules every in-place updater follows) moves tocfn_update.go, besidecfnUpdateUnmodelledProperties.docs/contributing.mdgets one line saying where CFN resources live. CHANGELOG has one line under Changed.Mapping
cfn_resources_v19.gocfn_resources_acm.go(ACM),cfn_resources_apigateway.go(REST + v2)cfn_resources_v20.gocfn_resources_stepfunctions.gocfn_resources_v21.gocfn_resources_ecr.go,cfn_resources_ecs.gocfn_resources_v22.gocfn_resources_cognito.gocfn_resources_v23.gocfn_resources_kinesis.go,cfn_resources_cloudfront.gocfn_resources_v25.gocfn_resources_rds.go,cfn_resources_elasticache.gocfn_resources_v26.gocfn_resources_efs.go,cfn_resources_glue.gocfn_resources_v27.gocfn_resources_budgets.gocfn_resources_v28.gocfn_resources_sesv2.go,cfn_resources_firehose.gocfn_resources_v31.gocfn_resources_appsync.gocfn_resources_v32.gocfn_resources_stubs.gocfn_resources_v34.godeployRDSDBCluster→rds,deployMSKCluster→cfn_resources_msk.go,cfnIntProp→cfn_resource_helpers.gocfn_resources_v41.gocfn_resources_ec2.gocfn_resources_v43.gocfn_resources_fsx.gocfn_resources_v77.goec2,deployIAMInstanceProfile→iam,cfnTypeServiceOverrides/servicePluginLoaded→cfn_resource_table.go,resolveStringList→ helperscfn_resources_v101.gocfn_resources_config.go(cfnSetMetadata→ helpers)cfn_resources_v128.gocfn_resources_backup.go;updateTransferServer→stubs;updateEC2LaunchTemplate→ec2;cfnCopyMetadata→ helperscfn_resources_v129.gocfnUpdateUnmodelledProperties,cfnChooseIf,cfnResolveStructured,cfnChangedAny,cfnUpdateDispatch,cfnJSONRequest) →cfn_update.go; updaters →lambda,dynamodb,sqs,sns,s3,kms,ec2(security group),ecs;cfnBoolValue→ helperscfn_resources_v129_iam.gocfn_resources_iam.go(cfnTagMap→ helpers)cfn_resources_v131.goec2,AWS::Lambda::Permission→lambda,AWS::SQS::QueuePolicy→sqstagging_scan_v129.go/_test.gotagging_scan_records.go/_test.gocfn_iam_v129_test.gocfn_resources_iam_test.gocfn_update_v129_test.gocfn_update_inplace_test.gocfn_resources_v32_test.gocfn_resources_stubs_test.gocfn_resources_v77_test.gocfn_resources_ec2_test.gocfn_resources_v101_test.gocfn_resources_config_test.gov016_extra_test.gokms_plugin_test.go,ssm_plugin_test.go,sns_plugin_test.go,sqs_plugin_test.go,secretsmanager_plugin_test.go; the CFN deploy tests and both helpers (newV016Deployer,newV016FullDeployer) →cfn_deployer_test.go; GetAtt →cfn_getatt_coverage_test.go; ResolveValue and dynamic refs →cfn_intrinsics_test.gov030_coverage_test.goservicequotas_plugin_test.go,sqs_fifo_test.go,s3_versioning_test.go,dynamodb_streams_test.go,lambda_esm_test.go,lambda_plugin_test.go, and the two CFN tests →cfn_deployer_test.goec2_v0126_review_test.goec2_spot_requests_test.go,ec2_fleet_test.go,ec2_security_group_canonical_test.go,ec2_security_group_duplicates_test.go,ec2_default_vpc_test.gocfn_resources_<service>.gowas used throughout, because the existingcfn_<service>*.gofiles are about one concern each (delete, GetAtt, bucket policy) rather than a service's resource helpers.Proof that the moves are pure
A throwaway go/ast program in
~/.xtmp, not committed, listed every top-level declaration inemulator/(package, kind, receiver and name), sorted. It ran before and after. A second pass added a SHA-256 of each declaration's comment-freego/printeroutput, so a changed body would show up even under an unchanged name.func TestFileNames_AreNamedByDomainNotRelease,var releaseNamedFile).writeFailureCases. Its only change is the subtest label"cfn_resources_v32.go"→"cfn_resources_stubs.go".The moves were done by a script that cut each declaration's source span verbatim, together with its doc and the floating comments before it.
goimportsthen rebuilt the import blocks.Gates (local, after the change)
make lint: 0 issuesmake test(race)make e2eSUBSTRATE_IAC=1 make iac-e2e: Terraform and CDK journeys passoperation-catalog-check,docs-reference-check,docs-headings-check,operation-docs-check,authz-reference-check,cfn-schema-checkwire-bookkeeping-check,discarded-unmarshal-check,discarded-marshal-check,discarded-state-check,nondeterminism-checkdocs-versions,docs-counts-checkrm -rf docs/node_modulesNo follow-up issues filed from this part.