Skip to content

feat!: convert to copier-managed skeleton - #48

Merged
oscar-hernandez-nttd merged 2 commits into
mainfrom
feat!/copier-conversion
Jul 21, 2026
Merged

feat!: convert to copier-managed skeleton#48
oscar-hernandez-nttd merged 2 commits into
mainfrom
feat!/copier-conversion

Conversation

@oscar-hernandez-nttd

@oscar-hernandez-nttd oscar-hernandez-nttd commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Converts this repository to the copier-managed skeleton layout, bringing its CI/CD tooling, linting configuration, and agent guidance in line with the rest of the Launch Terraform module library.

Jira: EN-3436

This PR contains two commits:

  1. feat!: convert to copier-managed skeleton — the automated conversion via updater.sh, delivering updated Makefile, GitHub workflows, .agents/ reference docs, .tool-versions, and related tooling/config files. This is a breaking change for anyone relying on the previous hand-maintained CI setup. It intentionally does not touch anything under tests/.

  2. fix: implement real readonly test and rename copy-pasted test entrypoints — a required follow-up. The conversion delivered .github/scripts/validate-readonly-test.sh, a new pre-commit hook that enforces a testing convention this repo's tests/ directory was already violating before this conversion — nobody was checking for it until now. tests/post_deploy_functional_readonly/main_test.go was a byte-for-byte copy of the functional test: same entrypoint name, same lib.RunSetupTestTeardown runner, same implementation function, including HTTP invocation of the Lambda function — none of which is valid for a read-only suite. This commit:

    • Adds TestComposableCompleteReadOnly (existence/attribute checks only, no invocation).
    • Refactors TestComposableComplete to call the read-only impl and layer the invoke assertions on top, so functional is a strict superset of readonly.
    • Rewires the readonly entrypoint to lib.RunNonDestructiveTest.
    • Renames both entrypoints from the leftover scaffold name TestLambdaLayerModule (a different Lambda resource type) to TestLambdaFunctionModule/TestLambdaFunctionModuleReadOnly.

    It's a fix: rather than folded into the feat!: commit because it corrects a pre-existing test defect the conversion's own new tooling surfaced, not a change to the conversion itself.

Test plan

  • make check passes locally (AWS_PROFILE=020127659860_AdministratorAccess AWS_REGION=us-east-2), including a real apply → assert → destroy cycle for the functional suite.
  • Pre-commit validate-readonly-test hook passes.
  • CI is green on this PR (Pre-Commit Checks, Terraform Tests, Terraform Lint, Conventional Commit PR Title).

…ints

The readonly suite was a byte-for-byte copy of the functional suite,
applying/destroying infra and invoking the function over HTTP instead of
only performing read-only verification. Add TestComposableCompleteReadOnly
(GetFunction checks only, no invoke), wire the readonly entrypoint to
lib.RunNonDestructiveTest, and have TestComposableComplete build on the
readonly impl before adding the invoke assertions. Also rename both
entrypoints from TestLambdaLayerModule, a leftover scaffold name for a
different Lambda resource type, to TestLambdaFunctionModule(ReadOnly).

@bryce-lynn-nttd bryce-lynn-nttd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean copier-managed skeleton conversion — approving.

Verified against head (dcc96bcf3):

  • Terraform interface untouchedmain.tf/variables.tf/outputs.tf/versions.tf aren't in the diff, so despite the feat! / breaking change label the break is the CI/build-contract only; downstream consumers need no code change.
  • Copier pin_commit: 0.7.1, the current stable skeleton release.
  • Single-source workflow pins — every launch-workflows ref is edddecd…, which exists in launch-workflows and maps to real tag 0.15.4.
  • Readonly test correctly wired and genuinely read-only — functional TestLambdaFunctionModuleRunSetupTestTeardown; readonly TestLambdaFunctionModuleReadOnlyRunNonDestructiveTest; both on TestComposable* names. TestComposableCompleteReadOnly does only GetFunction + assert.Equal on ARN/Name (no Invoke), and TestComposableComplete calls the read-only impl first, then layers the real Invoke assertions on top — functional as a strict superset of readonly. Stale TestLambdaLayerModule scaffold name fixed.
  • LCAF cleanup.lcafenv and legacy pull-request-terraform-check-aws.yml removed for the unified pull-request-check-terraform.yml.
  • Legacy shim intact — combined status green including the branch-protection-required Check AWS Terraform Code, alongside Terraform Lint / Terraform Tests / Pre-Commit Checks and CodeQL.

Nice touch splitting the pre-existing readonly-test defect into its own well-documented fix: commit rather than burying it in the conversion.

Generated with Cursor Agent (Opus 4.8)

@rakesh-gorige-nttd rakesh-gorige-nttd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean copier-managed skeleton conversion — approving.

Verified at head (dcc96bc):

  • Terraform interface untouched — root main.tf/variables.tf/outputs.tf/versions.tf are not in the diff; the feat! / breaking change label reflects CI/build-contract only, so downstream consumers need no code changes.
  • Copier pin_commit: 0.7.1.
  • Readonly test correctly wired and genuinely read-only — functional TestLambdaFunctionModuleRunSetupTestTeardown + TestComposableComplete; readonly TestLambdaFunctionModuleReadOnlyRunNonDestructiveTest + TestComposableCompleteReadOnly. The readonly impl does only GetFunction + ARN/Name equality checks (no HTTP invoke). Functional builds on readonly first, then layers invoke assertions — functional is a strict superset of readonly. Stale TestLambdaLayerModule scaffold name fixed.
  • LCAF cleanup.lcafenv and legacy pull-request-terraform-check-aws.yml removed; unified skeleton CI workflows in place.
  • Commit structure — good split between the feat!: conversion and the fix: commit that addresses the pre-existing readonly-test defect surfaced by the new validate-readonly-test.sh hook.
  • CI green — Pre-Commit, Terraform Lint/Tests, legacy status checks, and CodeQL all passing.

PR description is thorough and accurately documents both commits and the test plan.

@oscar-hernandez-nttd
oscar-hernandez-nttd merged commit 15a7f4c into main Jul 21, 2026
19 checks passed
@oscar-hernandez-nttd
oscar-hernandez-nttd deleted the feat!/copier-conversion branch July 21, 2026 20:42
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.

3 participants