Skip to content

invoke lint should assert the package layout instead of the loader failing on it #83

Description

@lancamat1

Context. _load_extension in tasks/schemas.py runs infrahubctl schema load <path> on
any directory it is handed. A directory under extensions/ or experimental/ that
contains no .yml makes that call fail with an infrahubctl error rather than a message
naming the repo rule it broke. docs/docs/contributing.mdx:11-13 states the rule: a
directory, one <schema_name>.yml, and a .metadata.yml entry.

This PR removed extensions/meet_me_room, the only directory that violated the rule, so
the marker now describes a hypothetical rather than a live failure. It is worth keeping as
a check, not as a comment.

Current marker.

tasks/schemas.py:16
    # TODO: here if in extensions folder we have a dir without schema it will fail

What this asks for. Add a structure assertion to invoke lint: every directory under
extensions/ and experimental/ has exactly one .yml and exactly one matching
.metadata.yml key, and every .metadata.yml key has a directory. Fail the lint task
with the offending path. Out of scope for #75, which does not own the tooling.

Origin: pass-1 review of #75, packet STRUCT-13, CC-8 bucket (c).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions