Skip to content

Commit

Permalink
Merge pull request #84 from auth0/improve-log-errors
Browse files Browse the repository at this point in the history
feat: log errors context
  • Loading branch information
cyx authored Jan 28, 2021
2 parents 4bc412e + 67fa25d commit f98d138
Show file tree
Hide file tree
Showing 214 changed files with 10,429 additions and 10,578 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ require (
github.com/AlecAivazis/survey/v2 v2.2.7
github.com/benbjohnson/clock v1.1.0 // indirect
github.com/briandowns/spinner v1.12.0
github.com/fatih/color v1.9.0 // indirect
github.com/fatih/color v1.10.0 // indirect
github.com/golang/mock v1.4.4
github.com/google/go-cmp v0.5.4
github.com/jsanda/tablewriter v0.0.2-0.20190614032957-c4e45dc9c708
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mattn/go-isatty v0.0.12
github.com/mattn/go-runewidth v0.0.10 // indirect
github.com/mholt/archiver/v3 v3.5.0
github.com/olekukonko/tablewriter v0.0.4
github.com/rivo/uniseg v0.2.0 // indirect
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.5.1
github.com/tidwall/pretty v1.0.2
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect
gopkg.in/auth0.v5 v5.8.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v2 v2.2.8
)

// replace gopkg.in/auth0.v5 => ../auth0

replace gopkg.in/auth0.v5 => github.com/go-auth0/auth0 v1.3.1-0.20210127175916-f1d24c8c0f88
replace gopkg.in/auth0.v5 => github.com/go-auth0/auth0 v1.3.1-0.20210128024326-898cafab69ba
28 changes: 11 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-auth0/auth0 v1.3.1-0.20210127122814-819354e637e9 h1:/Lolghe1pufQWJ+JcmX0UToYIr7bpNpDzo6PoVbFLX8=
github.com/go-auth0/auth0 v1.3.1-0.20210127122814-819354e637e9/go.mod h1:QQ9fgGj2Wpza15+Ho3mM6amMeKfhzHo2cixcOqdkoKk=
github.com/go-auth0/auth0 v1.3.1-0.20210127175916-f1d24c8c0f88 h1:pygD+OcQJTK7vDGzre8nrk+P1GDyLJvGw+NgN+vA08w=
github.com/go-auth0/auth0 v1.3.1-0.20210127175916-f1d24c8c0f88/go.mod h1:QQ9fgGj2Wpza15+Ho3mM6amMeKfhzHo2cixcOqdkoKk=
github.com/go-auth0/auth0 v1.3.1-0.20210128024326-898cafab69ba h1:q5mOa+S8JFpV5JzwTX5FImMekMxOkIGjWiH2OmSo92M=
github.com/go-auth0/auth0 v1.3.1-0.20210128024326-898cafab69ba/go.mod h1:QQ9fgGj2Wpza15+Ho3mM6amMeKfhzHo2cixcOqdkoKk=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down Expand Up @@ -165,8 +163,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jsanda/tablewriter v0.0.2-0.20190614032957-c4e45dc9c708 h1:iHNpdSksqNoMQLzebZoWhbRNlQbgaKKB+x/VrP+UDH8=
github.com/jsanda/tablewriter v0.0.2-0.20190614032957-c4e45dc9c708/go.mod h1:9Nb9KesU8Gu6NiQmPbF7ZV+lVoUvvIoO3GASEhHBdb0=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
Expand All @@ -193,21 +189,17 @@ github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczG
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg=
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mholt/archiver v1.1.2 h1:xukR55YIrnhDHp10lrNtRSsAK5THpWrOCuviweNSBw4=
github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU=
github.com/mholt/archiver/v3 v3.5.0 h1:nE8gZIrw66cu4osS/U7UW7YDuGMHssxKutU8IfWxwWE=
github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
Expand All @@ -218,7 +210,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ=
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8=
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pierrec/lz4/v4 v4.0.3 h1:vNQKSVZNYUEAvRY9FaUXAF1XPbSOHJtDTiP41kzDz2E=
github.com/pierrec/lz4/v4 v4.0.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
Expand Down Expand Up @@ -383,7 +376,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand All @@ -401,6 +393,8 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
4 changes: 4 additions & 0 deletions internal/auth0/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ type ActionBindingAPI interface {
List(triggerID management.TriggerID, opts ...management.RequestOption) (c *management.ActionBindingList, err error)
Update(triggerID management.TriggerID, v []*management.ActionBinding) (list *management.ActionBindingList, err error)
}

type ActionExecutionAPI interface {
Read(id string) (*management.ActionExecution, error)
}
43 changes: 43 additions & 0 deletions internal/auth0/actions/actions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package actions

import (
"errors"
"time"

"github.com/auth0/auth0-cli/internal/auth0"
"gopkg.in/auth0.v5/management"
)

// NewSampledExecutionAPI creates a decorated ActionExecutionAPI which
// implements a leaky bucket based on the given interval.
func NewSampledExecutionAPI(api auth0.ActionExecutionAPI, interval time.Duration) auth0.ActionExecutionAPI {
return &sampledExecutionAPI{
api: api,
interval: interval,
timer: time.NewTimer(0),
}
}

type sampledExecutionAPI struct {
auth0.ActionExecutionAPI

api auth0.ActionExecutionAPI

interval time.Duration
timer *time.Timer
}

// errRateLimited is returned whenever the leaky bucket isn't ready to drip.
var errRateLimited = errors.New("actions: rate limited")

// Read checks if the leaky bucket is ready to drip: if not, then an
// errRateLimited is returned.
func (a *sampledExecutionAPI) Read(id string) (*management.ActionExecution, error) {
select {
case <-a.timer.C:
a.timer.Reset(a.interval)
return a.api.Read(id)
default:
return nil, errRateLimited
}
}
46 changes: 24 additions & 22 deletions internal/auth0/auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,34 @@ import (
// API mimics `management.Management`s general interface, except it refers to
// the interfaces instead of the concrete structs.
type API struct {
Action ActionAPI
ActionVersion ActionVersionAPI
ActionBinding ActionBindingAPI
Client ClientAPI
Connection ConnectionAPI
Log LogAPI
Rule RuleAPI
ResourceServer ResourceServerAPI
Role RoleAPI
CustomDomain CustomDomainAPI
User UserAPI
Action ActionAPI
ActionVersion ActionVersionAPI
ActionExecution ActionExecutionAPI
ActionBinding ActionBindingAPI
Client ClientAPI
Connection ConnectionAPI
Log LogAPI
Rule RuleAPI
ResourceServer ResourceServerAPI
Role RoleAPI
CustomDomain CustomDomainAPI
User UserAPI
}

func NewAPI(m *management.Management) *API {
return &API{
Action: m.Action,
ActionVersion: m.ActionVersion,
ActionBinding: m.ActionBinding,
Client: m.Client,
Connection: m.Connection,
Log: m.Log,
ResourceServer: m.ResourceServer,
Rule: m.Rule,
Role: m.Role,
CustomDomain: m.CustomDomain,
User: m.User,
Action: m.Action,
ActionVersion: m.ActionVersion,
ActionExecution: m.ActionExecution,
ActionBinding: m.ActionBinding,
Client: m.Client,
Connection: m.Connection,
Log: m.Log,
ResourceServer: m.ResourceServer,
Rule: m.Rule,
Role: m.Role,
CustomDomain: m.CustomDomain,
User: m.User,
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/jsanda/tablewriter"
"github.com/olekukonko/tablewriter"
)

// TODO(cyx): think about whether we should extract this function in the
Expand Down
32 changes: 23 additions & 9 deletions internal/cli/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"sort"
"time"

"github.com/auth0/auth0-cli/internal/auth0/actions"
"github.com/spf13/cobra"
"gopkg.in/auth0.v5/management"
)
Expand All @@ -27,9 +28,13 @@ func getLatestLogs(cli *cli, n int) ([]*management.Log, error) {
}

func logsCmd(cli *cli) *cobra.Command {
var numberOfLogs int
var follow bool
var noColor bool
var flags struct {
Num int
Follow bool
NoColor bool
Silent bool
}

cmd := &cobra.Command{
Use: "logs",
Short: "Show the tenant logs",
Expand All @@ -38,7 +43,7 @@ Show the tenant logs.
`,
RunE: func(cmd *cobra.Command, args []string) error {
lastLogID := ""
list, err := getLatestLogs(cli, numberOfLogs)
list, err := getLatestLogs(cli, flags.Num)
if err != nil {
return err
}
Expand All @@ -55,7 +60,7 @@ Show the tenant logs.
}

var logsCh chan []*management.Log
if follow {
if flags.Follow {
logsCh = make(chan []*management.Log)

go func() {
Expand Down Expand Up @@ -89,14 +94,23 @@ Show the tenant logs.
}()
}

cli.renderer.LogList(list, logsCh, noColor)
// We create an execution API decorator which provides
// a leaky bucket implementation for Read. This
// protects us from being rate limited since we
// potentially have an N+1 querying situation.
actionExecutionAPI := actions.NewSampledExecutionAPI(
cli.api.ActionExecution, time.Second,
)

cli.renderer.LogList(list, logsCh, actionExecutionAPI, flags.NoColor, flags.Silent)
return nil
},
}

cmd.Flags().IntVarP(&numberOfLogs, "num-entries", "n", 100, "the number of log entries to print")
cmd.Flags().BoolVarP(&follow, "follow", "f", false, "Specify if the logs should be streamed.")
cmd.Flags().BoolVarP(&noColor, "no-color", "", false, "turn off colored print")
cmd.Flags().IntVarP(&flags.Num, "num-entries", "n", 100, "the number of log entries to print")
cmd.Flags().BoolVarP(&flags.Follow, "follow", "f", false, "Specify if the logs should be streamed")
cmd.Flags().BoolVar(&flags.NoColor, "no-color", false, "turn off colored print")
cmd.Flags().BoolVarP(&flags.Silent, "silent", "s", false, "do not display extended raw data")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion internal/display/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *Renderer) ActionList(actions []*management.Action) {

func (r *Renderer) ActionTest(payload management.Object) {
r.Heading(ansi.Bold(r.Tenant), "Actions test result\n")
r.JSONResult(payload, nil)
r.JSONResult(payload)
}

func (r *Renderer) Action(action *management.Action) {
Expand Down
Loading

0 comments on commit f98d138

Please sign in to comment.