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

.gitpod.Dockerfile: Auto-fetch Go and goyacc versions #14130

Merged

Conversation

mohamedawnallah
Copy link
Contributor

@mohamedawnallah mohamedawnallah commented May 21, 2024

Description

Fixes #14122

How could this be tested?

  1. Open the fetchGoVersionGitpodDockerFile branch in my forked Prometheus repository:
    https://github.com/mohamedawnallah/prometheus/tree/fetchGoVersionGitpodDockerFile

  2. Make sure you have Gitpod browser extension installed

  3. Click on the "Open in Gitpod" button in the GitHub repo.

  4. Verify that there are no package missing errors and that the build runs successfully, including the test cases (excluding the flaky ones).

@ArthurSens
Copy link
Member

Just tried opening a workspace, and somehow the version installed is not the one in go.mod 🤨

image

I didn't have time to investigate the reason yet, but this doesn't sound like the behavior you wanted, right?

@mohamedawnallah
Copy link
Contributor Author

Apologies, @ArthurSens! Upon debugging, I discovered a conflict with the GO_VERSION environment variable, which was already present in the Gitpod workspace. Therefore, I renamed my dynamically fetched Go version environment variable to CUSTOM_GO_VERSION, and it now functions as expected:

Screenshot 2024-05-24 at 9:09:23 AM

In this commit we auto-fetch Go version from go.mod
and goyacc version from Makefile in the Prometheus repo.

Signed-off-by: Mohamed Awnallah <[email protected]>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Awesome, good job finding the problem :)

@ArthurSens ArthurSens merged commit c0221d9 into prometheus:main May 24, 2024
25 checks passed
@mohamedawnallah mohamedawnallah deleted the fetchGoVersionGitpodDockerFile branch May 25, 2024 01:57
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.

Gitpod: Missing Packages in GOROOT during Build
2 participants