Skip to content

fix(xcontext): api_method should be a Field #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mysql:8.0
FROM mysql:8.0-debian

# Configure golang environment to run migration against database
ARG TARGETARCH
Expand Down
10 changes: 5 additions & 5 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (a *API) Start(ctx xcontext.Context, requestor EventRequestor, jobDescripto
ev := &Event{
// To allow jobs to finish we do not allow passing cancel and pause
// signals to the job's context (therefore: xcontext.WithResetSignalers).
Context: xcontext.WithResetSignalers(ctx).WithTag("api_method", "start"),
Context: xcontext.WithResetSignalers(ctx).WithField("api_method", "start"),
Type: EventTypeStart,
ServerID: resp.ServerID,
Msg: EventStartMsg{
Expand All @@ -191,7 +191,7 @@ func (a *API) Start(ctx xcontext.Context, requestor EventRequestor, jobDescripto
func (a *API) Stop(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) {
resp := a.newResponse(ResponseTypeStop)
ev := &Event{
Context: ctx.WithTag("api_method", "stop"),
Context: ctx.WithField("api_method", "stop"),
Type: EventTypeStop,
ServerID: resp.ServerID,
Msg: EventStopMsg{
Expand All @@ -214,7 +214,7 @@ func (a *API) Stop(ctx xcontext.Context, requestor EventRequestor, jobID types.J
func (a *API) Status(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) {
resp := a.newResponse(ResponseTypeStatus)
ev := &Event{
Context: ctx.WithTag("api_method", "status"),
Context: ctx.WithField("api_method", "status"),
Type: EventTypeStatus,
ServerID: resp.ServerID,
Msg: EventStatusMsg{
Expand All @@ -239,7 +239,7 @@ func (a *API) Status(ctx xcontext.Context, requestor EventRequestor, jobID types
func (a *API) Retry(ctx xcontext.Context, requestor EventRequestor, jobID types.JobID) (Response, error) {
resp := a.newResponse(ResponseTypeRetry)
ev := &Event{
Context: ctx.WithTag("api_method", "retry"),
Context: ctx.WithField("api_method", "retry"),
Type: EventTypeRetry,
ServerID: resp.ServerID,
Msg: EventRetryMsg{
Expand All @@ -266,7 +266,7 @@ func (a *API) Retry(ctx xcontext.Context, requestor EventRequestor, jobID types.
func (a *API) List(ctx xcontext.Context, requestor EventRequestor, query *storage.JobQuery) (Response, error) {
resp := a.newResponse(ResponseTypeList)
ev := &Event{
Context: ctx.WithTag("api_method", "list"),
Context: ctx.WithField("api_method", "list"),
Type: EventTypeList,
ServerID: resp.ServerID,
Msg: EventListMsg{
Expand Down