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

Update Dockerfile #5159

Merged
merged 21 commits into from
Mar 3, 2023
Merged

Update Dockerfile #5159

merged 21 commits into from
Mar 3, 2023

Conversation

mehrdadbn9
Copy link
Contributor

What this PR does:
Upgrade cortexto use go 1.20

Which issue(s) this PR fixes:
Fixes #5147

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: mehrdadbn9 <80095851+mehrdadbn9@users.noreply.github.com>
@alanprot
Copy link
Member

Can u update the changelog?

@mehrdadbn9 mehrdadbn9 mentioned this pull request Feb 21, 2023
3 tasks
@alvinlin123
Copy link
Member

alvinlin123 commented Feb 21, 2023

@mehrdadbn9 I lied when I told you that all you need to do is update the Dockerfile :) there are few more steps involved.

I have push a build image using the change in this PR (this step can only be done by maintainers).

The new build image is quay.io/cortexproject/build-image:upgrade-to-go1.20.1-e6945e022

Can you please follow step 5 in https://cortexmetrics.io/docs/contributing/how-to-update-the-build-image/ to have the GitHub workflow files and Makefile updated?

Reference commit: ddc56a0

Once you update this PR with the changes, the approval workflow will let us know if the new build image is ready to go or not.

Signed-off-by: Alvin Lin <alvinlin@amazon.com>
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Mar 2, 2023
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 2, 2023
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
@alvinlin123 alvinlin123 closed this Mar 3, 2023
@alvinlin123 alvinlin123 reopened this Mar 3, 2023
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
@alvinlin123 alvinlin123 requested review from alanprot and removed request for friedrichg March 3, 2023 03:18
@alvinlin123
Copy link
Member

alvinlin123 commented Mar 3, 2023

Sorry for the large amount of commits. Along the way of upgrade Go Lang I had to upgrade dependencies and fix bunch of issues. But, build finally works.

@@ -23,7 +23,7 @@ RUN GOARCH=$(go env GOARCH) && \
chmod +x shfmt && \
mv shfmt /usr/bin

RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.48.0
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.51.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for upgrading the version here is because the older version times out while running linter. However, the new version flagged few errors which I fixed/suppressed the in this PR.

Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Comment on lines +110 to +115
- requires_docker
- integration_alertmanager
- integration_backward_compatibility
- integration_memberlist
- integration_querier
- integration_ruler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing my linting bug :P. We should test lint on these yamls

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't fix it ... my IDE does it for me ;)

steps:
- name: Upgrade golang
uses: actions/setup-go@v2
with:
go-version: 1.19.x
go-version: 1.20.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 More specific is better

.github/workflows/test-build-deploy.yml Outdated Show resolved Hide resolved
.github/workflows/test-build-deploy.yml Outdated Show resolved Hide resolved
.github/workflows/test-build-deploy.yml Outdated Show resolved Hide resolved
.github/workflows/test-build-deploy.yml Outdated Show resolved Hide resolved
.github/workflows/test-build-deploy.yml Outdated Show resolved Hide resolved
alvinlin123 and others added 5 commits March 3, 2023 08:04
Co-authored-by: Friedrich Gonzalez <friedrichg@gmail.com>
Signed-off-by: Alvin Lin <alvinlin123@gmail.com>
Co-authored-by: Friedrich Gonzalez <friedrichg@gmail.com>
Signed-off-by: Alvin Lin <alvinlin123@gmail.com>
Co-authored-by: Friedrich Gonzalez <friedrichg@gmail.com>
Signed-off-by: Alvin Lin <alvinlin123@gmail.com>
Co-authored-by: Friedrich Gonzalez <friedrichg@gmail.com>
Signed-off-by: Alvin Lin <alvinlin123@gmail.com>
Co-authored-by: Friedrich Gonzalez <friedrichg@gmail.com>
Signed-off-by: Alvin Lin <alvinlin123@gmail.com>
@alvinlin123 alvinlin123 enabled auto-merge (squash) March 3, 2023 16:30
@alvinlin123 alvinlin123 merged commit b47e7b6 into cortexproject:master Mar 3, 2023
alexqyle pushed a commit to alexqyle/cortex that referenced this pull request May 2, 2023
* Update Dockerfile to upgrade Go runtime version.

Signed-off-by: mehrdadbn9 <80095851+mehrdadbn9@users.noreply.github.com>
Signed-off-by: Alvin Lin <alvinlin@amazon.com>
Signed-off-by: Alvin Lin <alvinlin123@gmail.com>
Co-authored-by: Alvin Lin <alvinlin@amazon.com>
Co-authored-by: Alvin Lin <alvinlin123@gmail.com>
Co-authored-by: Friedrich Gonzalez <friedrichg@gmail.com>
Signed-off-by: Alex Le <leqiyue@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade cortexto use go 1.20
4 participants