ci: fix git tag creation in transport release workflow --trigger-release#185
Conversation
Summary by CodeRabbit
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Shell Script
participant ci/scripts
GitHub Actions->>Shell Script: Set environment variables
GitHub Actions->>ci/scripts: cd ci/scripts && ./create-transport-tag.sh
GitHub Actions->>Shell Script: ./build-go-executables.sh (from repo root)
GitHub Actions->>Shell Script: ./upload-transport-builds.sh (from repo root)
Estimated code review effort1 (~4 minutes) Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/transports-release.yml(3 hunks)
🧠 Learnings (2)
📓 Common learnings
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:30-36
Timestamp: 2025-06-19T16:57:25.177Z
Learning: In the bifrost repository, Pratham-Mishra04 prefers to keep GitHub Actions workflows lean and trusts their controlled tagging process for core releases, avoiding unnecessary validation steps that they consider overkill.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#159
File: ci/npx/package.json:22-23
Timestamp: 2025-07-18T11:07:56.674Z
Learning: In the Bifrost project, Pratham-Mishra04 publishes the npm package by running `npm publish` from inside the `ci/npx` directory rather than from the repository root, and prefers not to use a `files` field to restrict the published package contents.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#141
File: core/bifrost.go:198-272
Timestamp: 2025-07-08T18:30:08.258Z
Learning: Pratham-Mishra04 follows a pattern of implementing core functionality first and deferring non-critical improvements (like race condition fixes, optimizations) to later PRs. This is a reasonable development approach that prioritizes getting the main feature working before addressing edge cases.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:53-75
Timestamp: 2025-06-20T16:21:18.912Z
Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using `go get`, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#55
File: core/providers/anthropic.go:358-388
Timestamp: 2025-06-04T05:37:59.699Z
Learning: User Pratham-Mishra04 prefers not to extract small code duplications (around 2 lines) into helper functions, considering the overhead not worth it for such minor repetition.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#102
File: README.md:62-66
Timestamp: 2025-06-19T17:03:03.639Z
Learning: Pratham-Mishra04 prefers using the implicit 'latest' tag for the maximhq/bifrost Docker image rather than pinning to specific versions.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#143
File: core/mcp.go:155-196
Timestamp: 2025-07-08T15:33:47.698Z
Learning: Pratham-Mishra04 prefers not to add explanatory comments for obvious code patterns, such as the unlock/lock strategy around network I/O operations, considering them self-explanatory to experienced developers.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#138
File: docs/usage/go-package/mcp.md:408-412
Timestamp: 2025-07-01T12:40:08.576Z
Learning: Pratham-Mishra04 is okay with keeping bullet list formatting that uses colons after dashes in markdown documentation, even if it triggers linter warnings, preferring functionality over strict formatting rules.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#150
File: transports/bifrost-http/lib/store.go:370-466
Timestamp: 2025-07-09T04:58:08.229Z
Learning: Pratham-Mishra04 prefers not to add logging or error handling for unreachable code paths in the Bifrost project. When provider types or similar entities are predefined in the system, defensive programming like logging in default cases is considered unnecessary overhead.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#162
File: tests/core-providers/scenarios/chat_completion_stream.go:103-105
Timestamp: 2025-07-16T04:26:09.288Z
Learning: Pratham-Mishra04 prefers to keep test code simple when it serves its basic functional purpose. For tests that are meant to validate core functionality (like verifying streaming works), they consider hard-coded reasonable limits acceptable rather than making them configurable.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#148
File: transports/bifrost-http/lib/store.go:880-910
Timestamp: 2025-07-08T17:14:21.544Z
Learning: Pratham-Mishra04 prefers resilient system design where missing environment variables for MCP connections should not cause complete system failure. The system should continue processing other MCP connections even when some fail, maintaining partial functionality rather than implementing fail-fast behavior.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#138
File: transports/README.md:26-28
Timestamp: 2025-07-01T12:45:06.906Z
Learning: Pratham-Mishra04 prefers keeping documentation examples simple and concise, trusting users to handle production-specific considerations like version pinning themselves rather than cluttering examples with additional notes.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#148
File: transports/bifrost-http/lib/store.go:1081-1098
Timestamp: 2025-07-08T17:16:50.811Z
Learning: Pratham-Mishra04 prefers practical redaction approaches over theoretical security improvements when the threat model is low-risk, such as admin-only interfaces in the Bifrost project. Fixed-length redaction is acceptable when only trusted administrators will see the redacted values.
.github/workflows/transports-release.yml (5)
Learnt from: Pratham-Mishra04
PR: #103
File: .github/workflows/transport-dependency-update.yml:53-75
Timestamp: 2025-06-20T16:21:18.912Z
Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using go get, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.
Learnt from: Pratham-Mishra04
PR: #103
File: .github/workflows/transport-dependency-update.yml:30-36
Timestamp: 2025-06-19T16:57:25.177Z
Learning: In the bifrost repository, Pratham-Mishra04 prefers to keep GitHub Actions workflows lean and trusts their controlled tagging process for core releases, avoiding unnecessary validation steps that they consider overkill.
Learnt from: Pratham-Mishra04
PR: #97
File: transports/Dockerfile:21-24
Timestamp: 2025-06-19T12:17:31.200Z
Learning: In transports/Dockerfile, the user prefers to keep the binary move and upx compression steps in separate RUN commands for better Docker layer caching, rather than combining them to reduce image layers.
Learnt from: Pratham-Mishra04
PR: #159
File: ci/npx/package.json:22-23
Timestamp: 2025-07-18T11:07:56.674Z
Learning: In the Bifrost project, Pratham-Mishra04 publishes the npm package by running npm publish from inside the ci/npx directory rather than from the repository root, and prefers not to use a files field to restrict the published package contents.
Learnt from: Pratham-Mishra04
PR: #158
File: ci/scripts/upload-builds.mjs:57-85
Timestamp: 2025-07-18T11:01:07.321Z
Learning: The Bifrost project's upload-builds.mjs script handles around 10 uploads only, making the current serial approach with 500ms delays acceptable for the pipeline performance (total ~5 seconds delay).
🪛 YAMLlint (1.37.1)
.github/workflows/transports-release.yml
[error] 115-115: trailing spaces
(trailing-spaces)
[error] 118-118: trailing spaces
(trailing-spaces)
[error] 121-121: trailing spaces
(trailing-spaces)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:30-36
Timestamp: 2025-06-19T16:57:25.177Z
Learning: In the bifrost repository, Pratham-Mishra04 prefers to keep GitHub Actions workflows lean and trusts their controlled tagging process for core releases, avoiding unnecessary validation steps that they consider overkill.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#159
File: ci/npx/package.json:22-23
Timestamp: 2025-07-18T11:07:56.674Z
Learning: In the Bifrost project, Pratham-Mishra04 publishes the npm package by running `npm publish` from inside the `ci/npx` directory rather than from the repository root, and prefers not to use a `files` field to restrict the published package contents.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#141
File: core/bifrost.go:198-272
Timestamp: 2025-07-08T18:30:08.258Z
Learning: Pratham-Mishra04 follows a pattern of implementing core functionality first and deferring non-critical improvements (like race condition fixes, optimizations) to later PRs. This is a reasonable development approach that prioritizes getting the main feature working before addressing edge cases.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#103
File: .github/workflows/transport-dependency-update.yml:53-75
Timestamp: 2025-06-20T16:21:18.912Z
Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using `go get`, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#55
File: core/providers/anthropic.go:358-388
Timestamp: 2025-06-04T05:37:59.699Z
Learning: User Pratham-Mishra04 prefers not to extract small code duplications (around 2 lines) into helper functions, considering the overhead not worth it for such minor repetition.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#102
File: README.md:62-66
Timestamp: 2025-06-19T17:03:03.639Z
Learning: Pratham-Mishra04 prefers using the implicit 'latest' tag for the maximhq/bifrost Docker image rather than pinning to specific versions.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#143
File: core/mcp.go:155-196
Timestamp: 2025-07-08T15:33:47.698Z
Learning: Pratham-Mishra04 prefers not to add explanatory comments for obvious code patterns, such as the unlock/lock strategy around network I/O operations, considering them self-explanatory to experienced developers.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#138
File: docs/usage/go-package/mcp.md:408-412
Timestamp: 2025-07-01T12:40:08.576Z
Learning: Pratham-Mishra04 is okay with keeping bullet list formatting that uses colons after dashes in markdown documentation, even if it triggers linter warnings, preferring functionality over strict formatting rules.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#150
File: transports/bifrost-http/lib/store.go:370-466
Timestamp: 2025-07-09T04:58:08.229Z
Learning: Pratham-Mishra04 prefers not to add logging or error handling for unreachable code paths in the Bifrost project. When provider types or similar entities are predefined in the system, defensive programming like logging in default cases is considered unnecessary overhead.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#162
File: tests/core-providers/scenarios/chat_completion_stream.go:103-105
Timestamp: 2025-07-16T04:26:09.288Z
Learning: Pratham-Mishra04 prefers to keep test code simple when it serves its basic functional purpose. For tests that are meant to validate core functionality (like verifying streaming works), they consider hard-coded reasonable limits acceptable rather than making them configurable.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#148
File: transports/bifrost-http/lib/store.go:880-910
Timestamp: 2025-07-08T17:14:21.544Z
Learning: Pratham-Mishra04 prefers resilient system design where missing environment variables for MCP connections should not cause complete system failure. The system should continue processing other MCP connections even when some fail, maintaining partial functionality rather than implementing fail-fast behavior.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#138
File: transports/README.md:26-28
Timestamp: 2025-07-01T12:45:06.906Z
Learning: Pratham-Mishra04 prefers keeping documentation examples simple and concise, trusting users to handle production-specific considerations like version pinning themselves rather than cluttering examples with additional notes.
Learnt from: Pratham-Mishra04
PR: maximhq/bifrost#148
File: transports/bifrost-http/lib/store.go:1081-1098
Timestamp: 2025-07-08T17:16:50.811Z
Learning: Pratham-Mishra04 prefers practical redaction approaches over theoretical security improvements when the threat model is low-risk, such as admin-only interfaces in the Bifrost project. Fixed-length redaction is acceptable when only trusted administrators will see the redacted values.
.github/workflows/transports-release.yml (5)
Learnt from: Pratham-Mishra04
PR: #103
File: .github/workflows/transport-dependency-update.yml:53-75
Timestamp: 2025-06-20T16:21:18.912Z
Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using go get, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.
Learnt from: Pratham-Mishra04
PR: #103
File: .github/workflows/transport-dependency-update.yml:30-36
Timestamp: 2025-06-19T16:57:25.177Z
Learning: In the bifrost repository, Pratham-Mishra04 prefers to keep GitHub Actions workflows lean and trusts their controlled tagging process for core releases, avoiding unnecessary validation steps that they consider overkill.
Learnt from: Pratham-Mishra04
PR: #97
File: transports/Dockerfile:21-24
Timestamp: 2025-06-19T12:17:31.200Z
Learning: In transports/Dockerfile, the user prefers to keep the binary move and upx compression steps in separate RUN commands for better Docker layer caching, rather than combining them to reduce image layers.
Learnt from: Pratham-Mishra04
PR: #159
File: ci/npx/package.json:22-23
Timestamp: 2025-07-18T11:07:56.674Z
Learning: In the Bifrost project, Pratham-Mishra04 publishes the npm package by running npm publish from inside the ci/npx directory rather than from the repository root, and prefers not to use a files field to restrict the published package contents.
Learnt from: Pratham-Mishra04
PR: #158
File: ci/scripts/upload-builds.mjs:57-85
Timestamp: 2025-07-18T11:01:07.321Z
Learning: The Bifrost project's upload-builds.mjs script handles around 10 uploads only, making the current serial approach with 500ms delays acceptable for the pipeline performance (total ~5 seconds delay).
🪛 YAMLlint (1.37.1)
.github/workflows/transports-release.yml
[error] 115-115: trailing spaces
(trailing-spaces)
[error] 118-118: trailing spaces
(trailing-spaces)
[error] 121-121: trailing spaces
(trailing-spaces)
🔇 Additional comments (2)
.github/workflows/transports-release.yml (2)
151-152: Clarify intent: no functional change neededGood call-out that
upload-builds.mjsmust run from the repo root; removing the oldworking-directoryline keeps the step behaviour explicit.
LGTM.
137-138: Quote the last argument to prevent word-splitting
"$(pwd)/transports"can expand to a path that contains spaces (rare but not impossible on self-hosted runners). Quoting all positional arguments keeps the call safe and consistent with earlier quoting.-ci/scripts/go-executable-build.sh bifrost-http ./dist ./bifrost-http "$(pwd)/transports" +ci/scripts/go-executable-build.sh bifrost-http ./dist ./bifrost-http "$(pwd)/transports"⛔ Skipped due to learnings
Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#97 File: transports/Dockerfile:21-24 Timestamp: 2025-06-19T12:17:31.200Z Learning: In transports/Dockerfile, the user prefers to keep the binary move and upx compression steps in separate RUN commands for better Docker layer caching, rather than combining them to reduce image layers.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#149 File: docs/contributing/README.md:22-27 Timestamp: 2025-07-08T18:12:13.590Z Learning: In the Bifrost project, the tests directory structure has `tests/core-providers/` and `tests/transports-integrations/` as sibling directories. From `tests/core-providers/`, the correct relative path to reach `tests/transports-integrations/` is `../transports-integrations/`, not `../../tests/transports-integrations/`.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#149 File: transports/README.md:34-39 Timestamp: 2025-07-08T18:21:31.772Z Learning: In the Bifrost Docker container (transports/Dockerfile), the entrypoint is configured to use `/app/data` as the default app directory, so Docker volume mounts to `/app/data` work automatically without needing to specify the `-app-dir` flag in the docker run command. This is different from the Go binary usage where `-app-dir` needs to be explicitly specified.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#159 File: docs/usage/http-transport/README.md:0-0 Timestamp: 2025-07-18T10:52:24.942Z Learning: In the Bifrost project, the npx wrapper (`npx -y bifrost@latest -port 8080`) correctly handles single-dash long flags like `-port` without requiring double dashes or the `--` separator. The implementation properly forwards flags to the underlying Go binary.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#103 File: .github/workflows/transport-dependency-update.yml:53-75 Timestamp: 2025-06-20T16:21:18.912Z Learning: In the bifrost repository's transport dependency update workflow, when updating the core dependency to a new version using `go get`, the go.mod and go.sum files will always change in normal operation, making the safety check for changes more of a defensive programming practice rather than handling a common scenario.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#149 File: transports/bifrost-http/plugins/logging/main.go:0-0 Timestamp: 2025-07-08T18:09:32.147Z Learning: In the Bifrost HTTP transport logging plugin (transports/bifrost-http/plugins/logging/main.go), the DatabasePath is explicitly set from main.go via a config struct pointing to appDir/logs, so the default value in the NewLoggerPlugin constructor is only used for standalone plugin usage and doesn't affect the main application flow.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#135 File: docs/core-package.md:105-116 Timestamp: 2025-06-27T17:07:39.462Z Learning: In Go, when importing a package, the identifier used to access it is determined by the `package` declaration in the Go source files, not the directory name. For the Bifrost project, the core directory files declare `package bifrost`, so importing `"github.com/maximhq/bifrost/core"` automatically makes it accessible as `bifrost.Init`, `bifrost.Ptr`, etc., without needing an explicit alias.Learnt from: Pratham-Mishra04 PR: maximhq/bifrost#159 File: ci/npx/package.json:22-23 Timestamp: 2025-07-18T11:07:56.674Z Learning: In the Bifrost project, Pratham-Mishra04 publishes the npm package by running `npm publish` from inside the `ci/npx` directory rather than from the repository root, and prefers not to use a `files` field to restrict the published package contents.
…ase (#185) # Fixed transport release workflow script paths and execution context This PR improves the transport release workflow by fixing issues with script execution paths and working directories: - Removed redundant `working-directory: .` declarations that were unnecessary - Modified the tag creation process to properly handle the working directory change: - Exports the `TRANSPORT_VERSION` variable to make it available after changing directories - Changes to the `ci/scripts` directory before executing the tag creation script - Added clarifying comments about script execution context and path expectations - Ensured the `go-executable-build.sh` script is called from the repository root - Added a comment clarifying that `upload-builds.mjs` must run from the root to find the `./dist` directory These changes ensure scripts are executed from the correct directories while maintaining proper access to environment variables.

Fixed transport release workflow script paths and execution context
This PR improves the transport release workflow by fixing issues with script execution paths and working directories:
working-directory: .declarations that were unnecessaryTRANSPORT_VERSIONvariable to make it available after changing directoriesci/scriptsdirectory before executing the tag creation scriptgo-executable-build.shscript is called from the repository rootupload-builds.mjsmust run from the root to find the./distdirectoryThese changes ensure scripts are executed from the correct directories while maintaining proper access to environment variables.