Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ahal opened this issue Dec 18, 2024 · 1 comment
Open

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

ahal opened this issue Dec 18, 2024 · 1 comment

Comments

@ahal
Copy link
Contributor

ahal commented Dec 18, 2024

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.

@ahal
Copy link
Contributor Author

ahal commented Dec 18, 2024

Once this is fixed, we should remove this hack in fxci-config:
mozilla-releng/fxci-config#232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant