Skip to content

adds explicit gopath#107

Merged
akshaydeo merged 1 commit into
mainfrom
test/gh-actions
Jun 21, 2025
Merged

adds explicit gopath#107
akshaydeo merged 1 commit into
mainfrom
test/gh-actions

Conversation

@akshaydeo
Copy link
Copy Markdown
Contributor

@akshaydeo akshaydeo commented Jun 21, 2025

TL;DR

Updated GitHub Actions workflow to trigger on test branch and set GOPATH in Docker build.

What changed?

  • Modified .github/workflows/transport-ci.yml to trigger on the test/gh-actions branch instead of tags
  • Commented out the tag triggers for dependency updates and docker builds
  • Added ENV GOPATH=/go to the transports Dockerfile to explicitly set the Go path

How to test?

  1. Push changes to the test/gh-actions branch
  2. Verify that the Transport CI workflow triggers correctly
  3. Confirm that Docker builds complete successfully with the explicit GOPATH set

Why make this change?

The changes allow for testing GitHub Actions workflows on a test branch without requiring tag creation. Setting the GOPATH explicitly in the Dockerfile ensures consistent build environments across different systems and CI platforms.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 21, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • Chores
    • Updated workflow triggers to respond to pushes on a specific branch instead of tags.
    • Modified Dockerfile to explicitly set the GOPATH environment variable during the build process.
      """

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to trigger on pushes to the "test/gh-actions" branch instead of specific tags.
    • Added an explicit GOPATH environment variable to the Docker build process.

Walkthrough

The changes update the CI workflow trigger in .github/workflows/transport-ci.yml to run on pushes to the test/gh-actions branch instead of specific tags. Additionally, the transports/Dockerfile is updated to explicitly set the GOPATH environment variable during the build process.

Changes

File(s) Change Summary
.github/workflows/transport-ci.yml Changed workflow trigger from tag-based to branch-based (test/gh-actions); previous triggers commented out.
transports/Dockerfile Added ENV GOPATH=/go to the builder stage to explicitly set the Go workspace path.

Possibly related PRs

Suggested reviewers

  • danpiths

Poem

In the warren where the code does flow,
CI now hops where branches grow.
GOPATH set, our builds take flight,
On test/gh-actions, day or night.
With every push, the rabbits cheer,
For smoother builds throughout the year! 🐇✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f5bbe6 and 7b439bb.

📒 Files selected for processing (2)
  • .github/workflows/transport-ci.yml (1 hunks)
  • transports/Dockerfile (1 hunks)
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch test/gh-actions

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@akshaydeo akshaydeo marked this pull request as ready for review June 21, 2025 11:04
@akshaydeo akshaydeo merged commit 9428776 into main Jun 21, 2025
3 of 4 checks passed
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Bug: Branch Push Triggers Job Skip

The Transport CI workflow is configured to trigger on pushes to the test/gh-actions branch. However, its jobs (update-transport-dependency and build-and-push-docker) contain conditional statements that check for tag-based references (e.g., startsWith(github.ref, 'refs/tags/core/v')). When triggered by a branch push, github.ref is refs/heads/test/gh-actions, causing these conditions to evaluate to false. As a result, all jobs are skipped, rendering the workflow non-functional for its intended purpose of testing on the branch.

.github/workflows/transport-ci.yml#L19-L94

jobs:
update-transport-dependency:
if: startsWith(github.ref, 'refs/tags/core/v')
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_transport_tag: ${{ steps.next_version.outputs.new_tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.GH_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.1"
- name: Get and validate core version from tag
id: get_version
run: |
TAG_NAME=${GITHUB_REF#refs/tags/core/}
# Validate core tag format
if ! echo "$TAG_NAME" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Error: Invalid core tag format 'core/$TAG_NAME'. Expected format: core/vMAJOR.MINOR.PATCH"
exit 1
fi
echo "version=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "Core version: ${TAG_NAME}"
- name: Configure Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Get latest transport version and increment
id: next_version
run: |
# Get the latest transport tag (using transports/ prefix to match docker build)
LATEST_TAG=$(git tag -l 'transports/v*' | sort -V | tail -n 1)
if [ -z "$LATEST_TAG" ]; then
# If no transport tag exists, start with v0.1.0
NEW_TAG="transports/v0.1.0"
else
# Extract version numbers
VERSION=${LATEST_TAG#transports/v}
# Validate version format
if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Error: Invalid tag format '$LATEST_TAG'. Expected format: transports/vMAJOR.MINOR.PATCH"
exit 1
fi
MAJOR=$(echo $VERSION | cut -d. -f1)
MINOR=$(echo $VERSION | cut -d. -f2)
PATCH=$(echo $VERSION | cut -d. -f3)
# Increment patch version
NEW_PATCH=$((PATCH + 1))
NEW_TAG="transports/v${MAJOR}.${MINOR}.${NEW_PATCH}"
fi
# Check if the new tag already exists
if git tag --list | grep -q "^${NEW_TAG}$"; then
echo "Error: Tag '$NEW_TAG' already exists!"
exit 1
fi
echo "new_tag=${NEW_TAG}" >> $GITHUB_OUTPUT

.github/workflows/transport-ci.yml#L3-L9

on:
push:
branches:
- test/gh-actions
# tags:
# - "core/v*" # Triggers dependency update
# - "transports/v*" # Triggers docker build (for manual tags)

Fix in Cursor


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@coderabbitai coderabbitai Bot requested a review from danpiths June 21, 2025 11:07
akshaydeo added a commit that referenced this pull request Nov 17, 2025
### TL;DR

Updated GitHub Actions workflow to trigger on test branch and set GOPATH in Docker build.

### What changed?

- Modified `.github/workflows/transport-ci.yml` to trigger on the `test/gh-actions` branch instead of tags
- Commented out the tag triggers for dependency updates and docker builds
- Added `ENV GOPATH=/go` to the transports Dockerfile to explicitly set the Go path

### How to test?

1. Push changes to the `test/gh-actions` branch
2. Verify that the Transport CI workflow triggers correctly
3. Confirm that Docker builds complete successfully with the explicit GOPATH set

### Why make this change?

The changes allow for testing GitHub Actions workflows on a test branch without requiring tag creation. Setting the GOPATH explicitly in the Dockerfile ensures consistent build environments across different systems and CI platforms.
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.

1 participant