[ci-admin] add support for pagination of output, controlling color output
Categories
(Firefox Build System :: Task Configuration, task)
Tracking
(Not tracked)
People
(Reporter: dustin, Unassigned, Mentored)
Details
(Keywords: good-first-bug, Whiteboard: [lang=py])
Comment 1•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 3•6 years ago
|
||
Hi vikrant1 It is, but give me a day or so -- we just finished a big refactor of ci-admin and you'll want to work on top of those changes.
Oh okay. I am new here and looking for my first successful contribution :)
Reporter | ||
Comment 5•6 years ago
|
||
OK, the code is now at https://github.com/taskcluster/tc-admin. As a first step, get it checked out and set up and make sure the tests run.
Then, see if based on the README you can write a simple app using this library that just generates one resource, say Role=project:relman:libmozevent/admins
, which you can see at
https://tools.taskcluster.net/auth/roles/project%3Arelman%3Alibmozevent%2Fadmins
and then try running TASKCLUSTER_ROOT_URL=https://taskcluster.net tc-admin diff
and see what the output looks like. That's the output we'll want to paginate.
(In reply to Dustin J. Mitchell [:dustin] (he/him) from comment #5)
OK, the code is now at https://github.com/taskcluster/tc-admin. As a first step, get it checked out and set up and make sure the tests run.
Then, see if based on the README you can write a simple app using this library that just generates one resource, say
Role=project:relman:libmozevent/admins
, which you can see at
https://tools.taskcluster.net/auth/roles/project%3Arelman%3Alibmozevent%2Fadminsand then try running
TASKCLUSTER_ROOT_URL=https://taskcluster.net tc-admin diff
and see what the output looks like. That's the output we'll want to paginate.
Hi Dustin,
I want to start contributing to Open Source. Has the issue been assigned to anyone?
(In reply to Dustin J. Mitchell [:dustin] (he/him) from comment #5)
OK, the code is now at https://github.com/taskcluster/tc-admin. As a first step, get it checked out and set up and make sure the tests run.
Then, see if based on the README you can write a simple app using this library that just generates one resource, say
Role=project:relman:libmozevent/admins
, which you can see at
https://tools.taskcluster.net/auth/roles/project%3Arelman%3Alibmozevent%2Fadminsand then try running
TASKCLUSTER_ROOT_URL=https://taskcluster.net tc-admin diff
and see what the output looks like. That's the output we'll want to paginate.
Sorry for the late reply. I am looking into this now. Thanks Dustin.
Sorry Aditya. Can you please let me work on this. I have already spent some time on studying this bug.
(In reply to vikrantcode from comment #7)
(In reply to Dustin J. Mitchell [:dustin] (he/him) from comment #5)
OK, the code is now at https://github.com/taskcluster/tc-admin. As a first step, get it checked out and set up and make sure the tests run.
Then, see if based on the README you can write a simple app using this library that just generates one resource, say
Role=project:relman:libmozevent/admins
, which you can see at
https://tools.taskcluster.net/auth/roles/project%3Arelman%3Alibmozevent%2Fadminsand then try running
TASKCLUSTER_ROOT_URL=https://taskcluster.net tc-admin diff
and see what the output looks like. That's the output we'll want to paginate.Sorry for the late reply. I am looking into this now. Thanks Dustin.
Sorry Aditya. Can you please let me work on this. I have already spent some time on studying this bug.
No Problem!
I am trying to understand how tcadmin works. My tc-admin.py
is :
from tcadmin.appconfig import AppConfig
from tcadmin.resources import Resources
from tcadmin.resources import Role
appconfig = AppConfig()
resources = Resources([])
resources.manage('Role=project:relman:libmozevent/admins')
hook = Role("project:relman:libmozevent/admins", "Created in bug 1467511", [
"auth:create-role:repo:github.com/mozilla/libmozevent:*",
"auth:delete-role:repo:github.com/mozilla/libmozevent:*",
"auth:update-role:repo:github.com/mozilla/libmozevent:*",
])
resources.add(hook)
But the TASKCLUSTER_ROOT_URL=https://taskcluster.net tc-admin generate --json
gives blank arrays. DId I forgot any step?
Reporter | ||
Comment 10•6 years ago
|
||
Close! You'll need to add that resource in a function registered for resource generation:
appconfig = AppConfig()
@appconfig.generators.register
async def update_resources(resources):
resources.manage('Role=project:relman:libmozevent/admins')
hook = Role("project:relman:libmozevent/admins", "Created in bug 1467511", [
"auth:create-role:repo:github.com/mozilla/libmozevent:*",
"auth:delete-role:repo:github.com/mozilla/libmozevent:*",
"auth:update-role:repo:github.com/mozilla/libmozevent:*",
])
resources.add(hook)
Comment 11•6 years ago
|
||
Thanks Dustin, It worked. Now what kind of pagination I should implement? Like man pages
or more of a command like tc-admin diff --page 4
? I think result piped to less
or info
will be better.
Reporter | ||
Comment 12•6 years ago
|
||
Yes, much more like man pages than --page
. Comment 1 has some useful ideas.
Comment 13•3 years ago
|
||
(In reply to Dustin J. Mitchell [:dustin] (he/him) from comment #12)
Yes, much more like man pages than
--page
. Comment 1 has some useful ideas.
Oh I am really really sorry for abandoning this. I got lost in my career and the COVID pandemic. Completely forgot that I was assigned this task. Recently logged in and found this again. Now that it is 3 years old, is it still open? Should I work on this?
Reporter | ||
Comment 14•3 years ago
|
||
Hi Vikrant -- I know how it goes :) I actually am not working at Mozilla anymore, so I'm not sure if this is still a useful thing to be working on. Unless you have a partially finished branch that you can just polish up, it might be best to find something more current..
Comment 15•3 years ago
|
||
Ah... okay, maybe I will checkout the latest code and see if it is required to work on.
Updated•3 years ago
|
Comment 16•2 years ago
|
||
hey my name is judith an outreachy applicant can I please work on this with help?
Description
•