Skip to content

t3820: Pin dependency versions and use official glab source in GitLab CI template#3860

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/3820-opencode-gitlab-ci-quality-debt
Mar 8, 2026
Merged

t3820: Pin dependency versions and use official glab source in GitLab CI template#3860
marcusquinn merged 1 commit intomainfrom
bugfix/3820-opencode-gitlab-ci-quality-debt

Conversation

@marcusquinn
Copy link
Copy Markdown
Owner

Summary

  • Pin opencode-ai to @1.2.21 in both main and minimal CI job configs for reproducible builds
  • Switch glab CLI install from archived profclems/glab (GitHub) to official gitlab-org/cli (GitLab), pinned at v1.89.0
  • Fix tar extraction path (bin/glab not root-level glab)
  • Remove fragile grep/cut JSON parsing of GitHub API response

Details

The review feedback from PR #5 identified two high-severity issues:

  1. Unpinned opencode-ai (line 33, 109): npm install --global opencode-ai without a version could break CI on any new release with breaking changes.

  2. Fragile glab install (lines 39-42): The original code fetched latest from the archived profclems/glab repo (last updated Oct 2022, pinned at v1.22.0) using fragile grep/cut JSON parsing. The official CLI has moved to gitlab.com/gitlab-org/cli (currently at v1.89.0). Additionally, the tar extraction assumed glab was at the archive root, but it's actually at bin/glab.

Closes #3820

…I template

- Pin opencode-ai to v1.2.21 in both main and minimal configs for
  reproducible builds (was unpinned, risking breakage on new releases)
- Switch glab install from archived profclems/glab (GitHub) to official
  gitlab-org/cli (GitLab), pinned at v1.89.0
- Fix tar extraction path (binary is at bin/glab, not root)
- Remove fragile grep/cut JSON parsing of GitHub API

Closes #3820
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the reliability and security of the GitLab CI templates by addressing critical dependency management issues. It ensures reproducible builds by pinning specific versions for key tools like opencode-ai and glab, and improves the glab installation process by migrating to its official source and eliminating fragile version parsing. These changes mitigate risks associated with unpinned dependencies and reliance on outdated or unofficial sources, leading to more stable and maintainable CI pipelines.

Highlights

  • Dependency Pinning: Pinned the opencode-ai dependency to version 1.2.21 in both main and minimal CI job configurations to ensure reproducible builds.
  • Glab CLI Source Update: Switched the glab CLI installation source from the archived profclems/glab GitHub repository to the official gitlab-org/cli GitLab repository.
  • Glab Version Control: Pinned the glab CLI version to v1.89.0 and removed the fragile grep/cut JSON parsing previously used to determine the latest version.
  • Glab Extraction Path Correction: Corrected the glab tar extraction path from glab to bin/glab to accurately move the executable.
Changelog
  • configs/mcp-templates/opencode-gitlab-ci.yml
    • The opencode-ai CLI dependency was pinned to version 1.2.21 for consistent builds.
    • The glab CLI installation was updated to use the official gitlab-org/cli source and a specific version (v1.89.0) was hardcoded.
    • The glab binary extraction path was corrected from glab to bin/glab.
    • Fragile grep/cut parsing for glab version retrieval was removed.
Activity
  • No human activity (comments, reviews, or progress updates) has been recorded for this pull request since its creation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 8, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 051b9350-faf7-4498-9149-c469aaac35f5

📥 Commits

Reviewing files that changed from the base of the PR and between 4d7cbb0 and cb755bf.

📒 Files selected for processing (1)
  • configs/mcp-templates/opencode-gitlab-ci.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/3820-opencode-gitlab-ci-quality-debt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 8, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 365 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Mar 8 09:15:19 UTC 2026: Code review monitoring started
Sun Mar 8 09:15:20 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 365

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 365
  • VULNERABILITIES: 0

Generated on: Sun Mar 8 09:15:22 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 8, 2026

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request makes important improvements to the GitLab CI template by pinning dependency versions for opencode-ai and glab. This is a great step towards ensuring reproducible and stable CI builds. Switching to the official glab repository and fixing the installation process also significantly increases reliability. I've added one suggestion to further enhance security by verifying the checksum of the downloaded glab binary, which would protect against potential supply-chain attacks.

Comment on lines +40 to +42
GLAB_VERSION="v1.89.0"
curl -sL "https://gitlab.com/gitlab-org/cli/-/releases/${GLAB_VERSION}/downloads/glab_${GLAB_VERSION#v}_linux_amd64.tar.gz" | tar xz
mv bin/glab /usr/local/bin/
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For enhanced security and to mitigate supply-chain attacks, it's a best practice to verify the checksum of downloaded artifacts. The glab releases provide a checksum file that can be used for this purpose.

This change introduces a step to download the glab archive, verify its SHA-512 checksum against a known value, and then proceed with extraction. This ensures the integrity of the CLI tool being installed.

      GLAB_VERSION="v1.89.0"
      GLAB_ARCHIVE="glab_${GLAB_VERSION#v}_linux_amd64.tar.gz"
      # SHA-512 for v1.89.0 from https://gitlab.com/gitlab-org/cli/-/releases/v1.89.0
      GLAB_CHECKSUM="572877508378775317426802118357803372233975253130101888916350320490085810"
      curl -sLO "https://gitlab.com/gitlab-org/cli/-/releases/${GLAB_VERSION}/downloads/${GLAB_ARCHIVE}"
      echo "${GLAB_CHECKSUM}  ${GLAB_ARCHIVE}" | sha512sum --check --strict
      tar xzf "${GLAB_ARCHIVE}"
      mv bin/glab /usr/local/bin/
      rm "${GLAB_ARCHIVE}"

@marcusquinn marcusquinn merged commit 15638f5 into main Mar 8, 2026
24 checks passed
@marcusquinn marcusquinn deleted the bugfix/3820-opencode-gitlab-ci-quality-debt branch March 8, 2026 09:21
marcusquinn added a commit to johnwaldo/aidevops that referenced this pull request Mar 8, 2026
…I template (marcusquinn#3860)

Merged by pulse supervisor — green CI, 1 review.
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.

quality-debt: configs/mcp-templates/opencode-gitlab-ci.yml — PR #5 review feedback (high)

1 participant