Files
floci/Makefile
T
Hector Ventura b76eadc98e docs(cloudformation): generate the supported resource-type table (#2739)
The "Supported Resource Types" table was hand-maintained, and had drifted:
ten provisioned types were undocumented, including the whole CloudFront
row, Lambda's Permission/MicrovmImage/NetworkConnector, RDS DBProxy and
DBProxyTargetGroup, ECS capacity providers, EC2 VPCEndpoint and
ApiGatewayV2 Authorizer.

Generate it from the provisioner inventory TSV that CfnResourceInventoryTest
already pins to the CDI-resolved registry, so the table cannot drift from
what Floci actually provisions. Wired into docs-sync and docs-check, with
the inventory path added to the workflow filters: it lives under
src/test/resources, which src/main/** did not cover, so a slice that moved
a type between owners would have skipped the gate.

The table is prose as much as data, so presentation stays configurable in
cfn_resource_types.yaml: service labels, curated type order (types not
listed there are appended alphabetically, so a new type still appears),
per-type notes, and extra_types for capabilities that are real but are not
provisioner types, each needing a stated reason. Nested Stack and the
Custom::* wildcard are the two such entries; the wildcard cannot be an
inventory type because the registry is keyed by exact type.

The generator reads the TSV rather than the Java because several
provisioners return Set.of(CONSTANT, CONSTANT) from resourceTypes(), which
a source regex only partly sees.

Also flags two things cheaply, before anyone waits on a Quarkus boot: a
provisioner missing @ApplicationScoped, and a type claimed by both the
legacy switch and a provisioner.
2026-08-30 13:04:29 -05:00

43 lines
1.5 KiB
Makefile

# Floci repo tasks.
#
# Action-table docs: docs/services/*.md "Supported Actions" tables are generated
# from handler source. See tools/docs/.
#
# Service-matrix docs: docs/services/index.md's Service Matrix table is checked
# against ResolvedServiceCatalog.java so a registered service can't ship undocumented.
PYTHON ?= python3
.PHONY: docs-sync docs-check docs-test
docs-sync: ## Regenerate the action tables in docs/services from handler source (in place)
$(PYTHON) tools/docs/regen_action_docs.py
$(PYTHON) tools/docs/regen_cfn_resource_types.py
docs-check: ## CI gate: regenerate and fail if anything is stale, unregistered, or undocumented
@$(PYTHON) tools/docs/regen_action_docs.py --strict || { \
echo ""; \
echo "error: action-table regeneration reported problems (see warnings above)."; \
exit 1; \
}
@$(PYTHON) tools/docs/regen_cfn_resource_types.py --strict || { \
echo ""; \
echo "error: the CloudFormation resource-type table is stale or reported problems."; \
echo " Run 'make docs-sync' and commit the result."; \
exit 1; \
}
@git diff --exit-code -- docs/ || { \
echo ""; \
echo "error: docs/services action tables are out of date."; \
echo " Run 'make docs-sync' and commit the result."; \
exit 1; \
}
@$(PYTHON) tools/docs/check_service_matrix.py --strict || { \
echo ""; \
echo "error: a registered service has no row in docs/services/index.md (see warnings above)."; \
exit 1; \
}
docs-test: ## Run the docs tooling's unit tests
$(PYTHON) -m pytest tools/docs -q