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

Adding VersionStream for gitlab-runner-17.6 #35289

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Adding VersionStream for gitlab-runner-17.6 #35289

merged 4 commits into from
Dec 10, 2024

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Nov 26, 2024

No description provided.

Copy link
Contributor Author

octo-sts bot commented Nov 26, 2024

Gen AI suggestions to solve the build error:

Based on the error provided and the melange YAML file, let me analyze the build failure:

• Detected Error: No explicit error shown, but the build seems to stop after package installation

• Error Category: Configuration/Build

• Failure Point: The build environment setup phase, specifically in the go/build step

• Root Cause Analysis:
The YAML file is using Go modules without explicitly specifying required build dependencies and Go version constraints. The issue appears related to Go toolchain configuration.

• Suggested Fix:
Add explicit build-time dependencies and Go version requirements to the pipeline:

pipeline:
  - uses: git-checkout
    with:
      repository: https://gitlab.com/gitlab-org/gitlab-runner
      tag: v${{package.version}}
      expected-commit: 12030cf4e1c6c9f8bc5a1e6eb515d7884e20f5c4

  - uses: go/build
    with:
      go-version: "1.23"  # Add explicit Go version
      packages: .
      output: gitlab-runner
      ldflags: -w -X gitlab.com/gitlab-org/gitlab-runner/common.NAME=${{package.name}} -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=v${{package.version}}
      # Add build dependencies
      build-dependencies:
        - build-base
        - git

• Explanation:

  • GitLab Runner requires specific Go version requirements
  • Adding explicit build dependencies ensures all required tools are available
  • Specifying Go version prevents toolchain mismatches

• Additional Notes:

  • Consider adding environment variables needed for Go builds
  • Verify the Go version matches GitLab Runner's requirements
  • Similar fixes should be applied to the subpackages' go/build steps

• References:

@hbh7 hbh7 self-assigned this Dec 9, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 9, 2024

Gen AI suggestions to solve the build error:

• Detected Error:
The error output doesn't show a clear failure message, but the log stops after the git clone command, suggesting the git checkout failed.

• Error Category: Version/Configuration

• Failure Point:
Git checkout step trying to clone https://gitlab.com/gitlab-org/gitlab-runner at tag v17.6.0

• Root Cause Analysis:
The expected commit hash (12030cf4e1c6c9f8bc5a1e6eb515d7884e20f5c4) likely doesn't match what's actually at the tag v17.6.0

• Suggested Fix:

  1. Verify the correct commit hash for v17.6.0 by running:
git ls-remote https://gitlab.com/gitlab-org/gitlab-runner v17.6.0
  1. Update the expected-commit field in the yaml with the actual commit hash

• Explanation:
Melange requires that the expected-commit matches exactly what's at the specified tag for security. This prevents supply chain attacks where a tag might be moved to point to malicious code.

• Additional Notes:

  • The version number and tag look correct (17.6.0)
  • The error is likely silent because git clone is using --quiet
  • You can verify the full build by running melange build --debug

• References:

@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Dec 9, 2024
@hbh7 hbh7 requested a review from a team December 9, 2024 22:06
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thank you for getting this going! It looks like the machine version matches from here as well: https://gitlab.com/gitlab-org/gitlab-runner/-/blob/v17.6.0/.gitlab/ci/_common.gitlab-ci.yml

@powersj powersj merged commit e7dbc1b into main Dec 10, 2024
13 of 14 checks passed
@powersj powersj deleted the gitlab-runner-17.6 branch December 10, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. service:version-stream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants