Comments (14)
Hi @djmitche is this issue open to outreachy applicants? Thanks!
from taskcluster.
It is, but note that it's in Go, not JS!
from taskcluster.
I just started learning Go and I would like to learn more, could I still work on it?
from taskcluster.
bump :)
from taskcluster.
Sure, have at it :)
from taskcluster.
Are these the steps to follow when getting this set up? https://github.com/taskcluster/taskcluster/blob/master/dev-docs/development-process.md#hacking-on-clients
from taskcluster.
No, that's a little outdated in fact, since it doesn't mention client-shell.
Like most go projects, you should be able to just run go test ./...
in the clients/client-shell
directory to get the tests to run. Unlike most go projects this one uses go mod
so it doesn't need to be checked out in a particular directory -- it should just work. Note that you'll need go1.12.9.
from taskcluster.
ok thank you!
from taskcluster.
Hi @djmitche sorry for not getting back to you sooner but here is my progress so far:
I understand that I am to make a verbose -v
flag for the version
command that directs output to stderr when present or null otherwise and this should be implemented using the log
library.
I have added the verbose
flag to the version
command as explained in the Cobra docs.
I am guessing we will be using the output
function from the log
library log.Output(calldepth, string)
to implement the output. However, I do not understand what the function is supposed to be doing. For example, if I had something like log.Output(1, "verbose")
, I do not know what that is supposed to print in this context.
Any tips would be helpful!
Thank you.
from taskcluster.
I think we want this option for all commands, not just version
. Logging for the version
command isn't that interesting! Maybe a better example is the taskcluster group cancel
command?
I think this will involve a few things:
- setting up a Logger that is available for every command
- configuring that logger (via
l.SetOutput
) based on whether--verbose
was passed - updating commands that output some status while they work (such as "cancelling task ") to use the Logger instead of just calling
fmt.Fprintf
.
I don't think there are many examples of the latter. The first two steps will be the more time-consuming steps.
from taskcluster.
Hi @djmitche
I would like to work on this issue 🙂
from taskcluster.
It's all yours!
from taskcluster.
@djmitche since all the subcommands are separated by packages, do we have to define a verbose
flag in each command seperately? or can we have a single PersistentPreRun
that can be defined for root
command and use that instead?
A sample snippet that I could find from Scaffold
func Command() *cobra.Command {
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
if err := setUpLogs(os.Stdout, v); err != nil {
return err
}
return nil
}
rootCmd.PersistentFlags().StringVarP(&v, "verbose", "v", logrus.WarnLevel.String(), "Log level (debug, info, warn, error, fatal, panic")
return rootCmd
}
from taskcluster.
I don't know much about Cobra, but if that approach works, it seems like the best solution.
from taskcluster.
Related Issues (20)
- Generic-worker intermittent test failure
- Worker-manager provisioner could use total claimed to know how many tasks are running
- kvm broken in d2g
- generic-worker should set TASKCLUSTER_INSTANCE_TYPE HOT 2
- Version parameter output not consistent HOT 1
- Worker Runner to support IMDSv2 in EC2
- No Notifications for Insufficient AWS Permissions in Taskcluster Worker Pool Creation HOT 1
- Livelog failure HOT 2
- tc-github shouldn't report an error if sealTaskGroup fails with 404 HOT 2
- kvm broken under d2g HOT 3
- Pagination with incorrect payload results in 500 Internal server error
- Expose worker-manager metrics through pulse
- RFC191: Introduce launch configuration entity and expose new API endpoints
- RFC191: Update existing w-m worker pool API methods to use new entity, migrate existing configurations
- RFC191: Implement health metrics for launch configurations HOT 1
- worker manager thought tasks were pending despite them being cancelled HOT 3
- worker-manager over-provisiones worker pools HOT 2
- RFC191: Switch provisioner and estimator to use launch configurations
- RFC191: Use health metrics to adjust weight at provision time
- Should not depend on go module github.com/taskcluster/taskcluster@latest (v24.3.1+incompatible)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taskcluster.