Uh oh!
There was an error while loading. Please reload this page.
feat(sdk): static stub configuration - #18
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| "context" | ||
| "time" | ||
| "github.com/sirupsen/logrus" |
There was a problem hiding this comment.
I wonder if we can replace logrus in favor of a better logger - this is a discussion for another time, but just thought I would call it out.
There was a problem hiding this comment.
Fix logging is on my todo list for later as well. Just wanted to have something so I can place log statements. But don't like it much either.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3baf6e6 to
e403ca7CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3040893 to
da765d0Comparebef220d to
c2a33c4Compare| if cfg.name == "" { | ||
| if len(os.Args) == 0 { | ||
| // This should never happen in practice but can happen in tests or when something else empties os.Args for whatever reason. | ||
| return nil, errors.New("plugin name must be specified (could not derive from os.Args)") |
There was a problem hiding this comment.
This is a bit unfortunate. But I believe eg go test does it (that made the tests crash on CI so I noticed). Otherwise we could have moved that up to the line where the struct gets created initially.
c2a33c4 to
f09f590Comparef09f590 to
1736c4dCompareUh oh!
There was an error while loading. Please reload this page.
| if result.RegistrationTimeout == 0 { | ||
| return nil, errors.New("plugin registration timeout is required") | ||
| } |
There was a problem hiding this comment.
Wonder if it's necessary to error on a timeout value, perhaps just fallback to a sane default instead?
There was a problem hiding this comment.
Let's keep for now. In NRI they didn't error on this which made them miss that in NRI configuring the registration timeout is actually bugged / doesn't work.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Benehiko
left a comment
There was a problem hiding this comment.
One small change, then we're good to go!
Uh oh!
There was an error while loading. Please reload this page.
deff3f1 to
292648eCompare
There's a set of static configuration on the stub that either
As this is somewhat implicit but very externally facing, I want to make sure everything is well tested and documented.