feat: support trace with executables#81
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #81 +/- ##
=======================================
Coverage 82.46% 82.46%
=======================================
Files 6 6
Lines 382 382
=======================================
Hits 315 315
Misses 45 45
Partials 22 22 |
|
Some general questions:
|
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
| if oldStart != nil { | ||
| start := trace.ExecuteStart | ||
| trace.ExecuteStart = func(executableName, action string) { | ||
| start(executableName, action) |
There was a problem hiding this comment.
Added the check and refactored this part of code.
| if oldDone != nil { | ||
| done := trace.ExecuteDone | ||
| trace.ExecuteDone = func(executableName, action string, err error) { | ||
| done(executableName, action, err) |
There was a problem hiding this comment.
Added the check and refactored this part of code.
| if trace == nil { | ||
| return ctx | ||
| } | ||
| oldTrace, _ := ctx.Value(executableTraceContextKey{}).(*ExecutableTrace) |
There was a problem hiding this comment.
ContextExecutableTrace() should be reused for this line.
There was a problem hiding this comment.
Resued ContextExecutableTrace()
|
I just wonder why this isn't being added to oras-go |
@TerryHowe It will be added to |
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
| "testing" | ||
|
|
||
| "github.com/oras-project/oras-credentials-go/trace" | ||
|
|
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Resolves #63