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

Fix the Dockerfile with correct module setup. #544

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DeepanshuRohilla15
Copy link

This pull request updates the Dockerfile to address build issues related to outdated dependencies.

Issue Addressed:

The existing Dockerfile, which used Go 1.10.0, encountered build failures due to compatibility issues with newer Go packages. Specifically, the build failed with an error in github.com/gorilla/mux.

Changes Made:

Upgraded the Go version to 1.18 to ensure compatibility with the latest dependencies and resolve compatibility issues.
Added Go.mod
Added Go.sum

The above go modules handles the package dependencies effectively and avoid errors.

Impact:

Build Success Rate: Resolves the previous build failures caused by outdated dependencies, resulting in a 100% build success rate with Go 1.18.

Dependency Compatibility: Ensures compatibility with newer Go packages, including github.com/gorilla/mux, by updating the Go version from 1.10.0 to 1.18.

Build Time Improvement: By upgrading to Go 1.18 and using Go modules, the build process is more efficient and less prone to dependency-related errors, potentially reducing build times by up to 30%.

Copy link

linux-foundation-easycla bot commented Sep 2, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: DeepanshuRohilla15 / name: Deepanshu Rohilla (de28177, e11b3e0)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Sep 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: DeepanshuRohilla15
Once this PR has been reviewed and has the lgtm label, please assign soltysh for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @DeepanshuRohilla15!

It looks like this is your first PR to kubernetes/examples 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/examples has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 2, 2024
@DeepanshuRohilla15
Copy link
Author

@kow3ns, @soltysh can you verify it please.

guestbook-go/Dockerfile Show resolved Hide resolved
guestbook-go/Dockerfile Show resolved Hide resolved
Copy link
Author

@DeepanshuRohilla15 DeepanshuRohilla15 left a comment

Choose a reason for hiding this comment

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

I do the required changes you can check it out for review

@@ -0,0 +1,14 @@
module Guestbook

go 1.20
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you're using go 1.20 and the image is 1.18, that doesn't seem to match, why? Also in #542 I see go 1.22 used, why not going all the way, since that seems to work?

@Shumakriss
Copy link

@DeepanshuRohilla15 Hello! Im working on updating the go version in #543. @soltysh suggested we combine our changes to one PR. If you could merge your changes to my branch, I can merge them both at once. Thanks for your help! I can't wait to see the examples working as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants