Skip to content

Add a flag to limit which resources are operated on #277

@ahal

Description

@ahal

In fxci-config we added a --resources flag which allows to only generate a subset of the registered resources. For example, if you run:

tc-admin diff --resources worker_pools

Only the worker pool generation happens. This is different than --grep which generates everything, but then filters out what gets displayed. This is useful as it cuts the generation down from ~2 minutes to ~5 seconds in many cases, so it's invaluable while developing.

The problem is that because the flag is tacked on outside of tc-admin, it doesn't play nicely in some cases. For instance, the above command still requires the auth:list-clients scope (even though we aren't even generating clients) because of this line:

clients.fetch_clients(resources),

I realized that --resources needs to be implemented in tc-admin if we're going to fix things like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions