Skip to content
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

Merged

Conversation

jefchien
Copy link
Member

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, and prometheus_mock

@jefchien jefchien requested a review from Aneurysm9 November 17, 2021 01:20
@@ -1,6 +1,8 @@
FROM golang:1.17 as build
FROM golang:1.17 AS build
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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
Copy link
Member

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.

@Aneurysm9 Aneurysm9 merged commit 0ab9f12 into aws-observability:terraform Nov 17, 2021
@jefchien jefchien deleted the fix-mock-server-https-put-data branch November 17, 2021 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prometheus_mock test fails
3 participants