-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fixed https mocked server /put-data* endpoint. #406
Fixed https mocked server /put-data* endpoint. #406
Conversation
@@ -1,6 +1,8 @@ | |||
FROM golang:1.17 as build | |||
FROM golang:1.17 AS build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed or is this just to match convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed. I just copied over that part of the Dockerfile from the other mocked_servers. Didn't notice they were different.
WORKDIR $GOPATH/main | ||
COPY . . | ||
RUN go env -w GOPROXY=direct | ||
RUN GO111MODULE=on go mod download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for mod caching?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not for it, but I believe it will cache the modules if the go.mod doesn't change between runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in order to achieve that you might need to copy just go.mod
and go.sum
as otherwise any changes in other files would cause a different layer hash a couple steps previously and force this step to execute again. The remaining files could be copied in after this step.
WORKDIR $GOPATH/main | ||
COPY . . | ||
RUN go env -w GOPROXY=direct | ||
RUN GO111MODULE=on go mod download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in order to achieve that you might need to copy just go.mod
and go.sum
as otherwise any changes in other files would cause a different layer hash a couple steps previously and force this step to execute again. The remaining files could be copied in after this step.
Fixes #404 as the prometheus exporter pushes to
/put-data
, which was not matching on/put-data/
.Tested against
otlp_*_exporter_*_mock
,otlp_mock
,sapm_exporter_trace_mock
, andprometheus_mock