refactor: Remove dead legacy traefik/OIDC code (Plan C)#214
Conversation
oidc_snippet.py read metadata['traefik'], a key the schema dropped (extra=forbid rejects it), so generate_oidc_snippet always returned None — dead. Remove it, its builder wiring, and the unwired TraefikConfig/TraefikOIDC models + their tests. Keep TraefikForwardAuth (shared by the live RoutingAuth.forward_auth) and test_templates_oidc.py (covers the live routing.auth.mode==oidc scaffolding, which Plan B rebuilds on). No app sets mode:oidc today, so the rules.j2 is_oidc_app install block is left in place harmlessly. Closes #210
Code review — remove dead legacy traefik/OIDC codeAutomated multi-persona review (correctness, project-standards, testing lenses) over the diff. Verdict: Ready to merge. Clean deletion: no dangling references to any removed symbol ( One finding (advisory — pre-existing, tracked by #211)
Verification
Closes #210. |
What & why
Removes dead legacy traefik/OIDC code (Plan C of the #207 series).
oidc_snippet.pyreadmetadata["traefik"]["oidc"], but the schema migratedtraefik:→routing:andPackageMetadatahasextra="forbid", so atraefik:key is rejected andgenerate_oidc_snippetalways returnedNone. TheTraefikConfig/TraefikOIDCmodels were likewise unwired. Removing this leaves one OIDC mechanism for Plan B (#211) to rebuild on, instead of a confusing second surface that looks functional but can't run.Removed
src/generate_container_packages/oidc_snippet.pyand its builder wiring (import,copy_source_filescall,generate_oidc_snippet_file).TraefikConfig/TraefikOIDCfromsrc/schemas/metadata.py.tests/test_oidc_snippet.py(the only test of the dead generator) and theTraefikConfig/TraefikOIDCcases intests/test_traefik_schema.py.Deliberately kept
TraefikForwardAuth— shared by the liveRoutingAuth.forward_auth(metadata.py:169), not legacy-only. Its tests stay.tests/test_templates_oidc.py— exercises the liverouting.auth.mode == "oidc"template scaffolding (rules.j2install, postinst secret-gen,service.j2Authelia ordering) that this PR retains and Plan B rebuilds on.rules.j2{% if is_oidc_app %} install oidc-client.ymlblock is left in place — harmless today (verified no app setsmode: oidc), and Plan B re-supplies the generator.Verification
traefik:key or legacyauth: oidcinhalos-marine-containers/appsorhalos-imported-containers, and no in-tree importer of the removed symbols beyond the deleted files.test_templates_oidc.pygreen);ruff check,ruff format --check,uvx ty check src/all clean.+N.Post-Deploy Monitoring & Validation
No production runtime impact — this removes unreachable generator code. No generated package output changes (no current app triggers the removed path). No monitoring required.
Closes #210.