Fix silently dropped component inputs and dead integration tests

What

Five pre-existing defects, all found by cross-checking every inputs: block in the repo against the target template's declared spec.inputs.

Silently dropped inputs

Undeclared input passedvalidate-plan-destroy.yml passed destroy: true to its fetch-mr-plan.yml include, which declares no such input. Only surfaced with use_mr_plan: true, since the include is otherwise ruled out. The two legitimate destroy: true occurrences (both targeting plan.yml, which does declare it) are untouched.

Declared but not forwarded to the child pipeline — these were silently lost whenever trigger_in_child_pipeline: true:

Template Inputs
validate-plan-apply.yml apply_artifacts_access, apply_save_outputs_as_artifact, apply_output_artifact_name, fetch_mr_plan_plan_job_name
validate-plan-destroy.yml fetch_mr_plan_plan_job_name
full-pipeline.yml test_rules

Deliberately not forwarded: child_pipeline_name/_stage/_rules. The child is triggered with trigger_in_child_pipeline: false, so it never creates a bridge job and those inputs have no consumer.

Dead integration tests

Three files in tests/integration-tests/ had zero references in the matrix and had never run at any point in history (verified with git log -S).

Environment.gitlab-ci.yml → registered. This means environment_prefix, environment_name and environment_url finally get integration coverage — environment_url has had none since it was introduced in bdbc555.

Two fixes were needed first. environment_name: $CI_COMMIT_REF_NAME is not safe here: a ref-derived name is shared by the concurrent [alpine] and [debian] child pipelines, so one entry's destroy (action: stop) can stop the environment the other is deploying to, and a newer pipeline on the same ref can drop this pipeline's apply with failed_outdated_deployment_job. It now derives from $TEST_GITLAB_TOFU_STATE_NAME, matching every other test. environment_url was folded in so one test covers all three inputs.

EnvironmentWithURL.gitlab-ci.yml → deleted. A strict subset of the above once environment_url was folded in; keeping it would cost a second pair of child pipelines (~14 jobs) for zero extra coverage.

ValidatePlanApplyCacheKey.gitlab-ci.yml → deleted. Created in 5426b3c as an unmentioned copy of ValidatePlanApply.gitlab-ci.yml. cache_key was never an input on validate-plan-apply.yml (use_lockfile_for_cache_key is a different thing), so the file could never have worked — and with that line removed it is identical to the already-registered ValidatePlanApply. Nothing to preserve.

Every file in tests/integration-tests/ is now reachable from the matrix, and vice versa.

Testing

  • make docs && git diff --exit-code -- README.md .gitlab/README.md.template → exit 0 (no spec inputs added or removed, so no doc change).
  • YAML parse of all five modified files → OK.
  • Input cross-check re-run post-fix → zero undeclared inputs remaining.
  • Registration invariant → no unregistered files, no missing files.

Follow-up worth considering

The input cross-check that found these is not committed. Turning it into a CI lint job would keep catching this class of bug — these two got in precisely because nothing validates that an inputs: key exists on the target.

Merge request reports

Loading