-
Notifications
You must be signed in to change notification settings - Fork 16
EPMRPP-110531 || MCP Server. Deploy. Move docker image build to the release github action #73
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
Conversation
…g array data type
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughRemoves Docker image definitions from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
.github/workflows/release.ymlis excluded by none and included by none
📒 Files selected for processing (4)
.goreleaser.yaml(1 hunks)internal/reportportal/items.go(1 hunks)internal/reportportal/items_test.go(2 hunks)release.dockerfile(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.go
📄 CodeRabbit inference engine (README.md)
**/*.go: Build and compile the ReportPortal MCP Server Go application usinggo build -o reportportal-mcp-server ./cmd/reportportal-mcp-server
Set environment variables RP_HOST, RP_PROJECT, and RP_API_TOKEN for stdio mode operation, or set MCP_MODE=http with MCP_SERVER_PORT and MCP_SERVER_HOST for HTTP mode
Require Go 1.24.1 or later for building the ReportPortal MCP Server
Add new tools by creating methods in resource files and registering them in theNewServerfunction usings.AddTool()
Ensure all MCP requests follow JSON-RPC 2.0 specification with required fields: jsonrpc, method, id, and params
Use/mcpor/api/mcpendpoints for POST requests (MCP protocol); use/,/health,/info,/api/status, or/metricsfor GET requests only
Files:
internal/reportportal/items.gointernal/reportportal/items_test.go
⚙️ CodeRabbit configuration file
Focus on Go best practices, error handling, concurrency safety, performance, and security. Check for proper resource cleanup and context handling.
Files:
internal/reportportal/items.gointernal/reportportal/items_test.go
internal/reportportal/**
⚙️ CodeRabbit configuration file
Pay special attention to API integration patterns, error handling, data validation, and MCP protocol compliance.
Files:
internal/reportportal/items.gointernal/reportportal/items_test.go
**/*_test.go
⚙️ CodeRabbit configuration file
Ensure comprehensive test coverage, proper test isolation, meaningful assertions, and good test naming conventions.
Files:
internal/reportportal/items_test.go
🧠 Learnings (2)
📚 Learning: 2025-12-01T14:55:41.065Z
Learnt from: CR
Repo: reportportal/reportportal-mcp-server PR: 0
File: README.md:0-0
Timestamp: 2025-12-01T14:55:41.065Z
Learning: Applies to **/*.go : Build and compile the ReportPortal MCP Server Go application using `go build -o reportportal-mcp-server ./cmd/reportportal-mcp-server`
Applied to files:
release.dockerfile
📚 Learning: 2025-12-01T14:55:41.065Z
Learnt from: CR
Repo: reportportal/reportportal-mcp-server PR: 0
File: README.md:0-0
Timestamp: 2025-12-01T14:55:41.065Z
Learning: Applies to **/*.go : Require Go 1.24.1 or later for building the ReportPortal MCP Server
Applied to files:
release.dockerfile
🧬 Code graph analysis (1)
internal/reportportal/items_test.go (1)
internal/reportportal/items.go (1)
NewTestItemResources(26-39)
🪛 Checkov (3.2.334)
release.dockerfile
[low] 20-20: Ensure the base image uses a non latest version tag
(CKV_DOCKER_7)
[low] 1-28: Ensure that HEALTHCHECK instructions have been added to container images
(CKV_DOCKER_2)
[low] 1-28: Ensure that a user for the container has been created
(CKV_DOCKER_3)
🪛 Hadolint (2.14.0)
release.dockerfile
[warning] 20-20: Always tag the version of an image explicitly
(DL3006)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Agent
- GitHub Check: Call feature Docker build / Build and export to AWS ECR
🔇 Additional comments (3)
internal/reportportal/items.go (1)
708-712: LGTM! Schema enhancement improves tooling compatibility.Adding
mcp.WithStringItems()explicitly declares that the array contains string items, which improves VS Code and GitHub Copilot integration by providing clear type information in the MCP tool schema..goreleaser.yaml (1)
29-30: LGTM! Clear documentation of build process change.The comment effectively explains why Docker builds were moved to a separate Docker Buildx workflow, noting the benefit of clean multi-arch images without intermediate tags.
release.dockerfile (1)
1-18: Excellent multistage build implementation!The builder stage properly separates build-time dependencies from runtime, with good layer caching strategy (copying go.mod/go.sum first). The CGO_ENABLED=0 flag and build command align with project requirements, and the version injection via build args enables proper versioning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR moves Docker image building from GoReleaser to a dedicated GitHub Actions workflow step, addressing ticket EPMRPP-110531. The change creates a cleaner multi-arch Docker image build process and includes a bug fix for VS Code/GitHub Copilot compatibility with MCP array parameters.
- Refactored Dockerfile to use multi-stage builds with Go compilation in the builder stage
- Removed Docker configuration from GoReleaser and added explicit Docker buildx step in GitHub Actions workflow
- Fixed MCP array schema to include
itemsproperty for VS Code/GitHub Copilot compatibility (issue #66)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| release.dockerfile | Converted from single-stage to multi-stage build with Go builder stage and distroless runtime |
| .goreleaser.yaml | Removed Docker and Docker manifest configurations, delegating to GitHub Actions |
| .github/workflows/release.yml | Added Docker buildx step to build and push multi-arch images with proper labels and tags |
| internal/reportportal/items.go | Added mcp.WithStringItems() to array parameter for VS Code compatibility |
| internal/reportportal/items_test.go | Added test to verify array items property exists in tool schema |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…elease github action
762b628 to
2fb7f9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
.github/workflows/release.ymlis excluded by none and included by none
📒 Files selected for processing (2)
.goreleaser.yaml(1 hunks)release.dockerfile(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-12-01T14:55:41.065Z
Learnt from: CR
Repo: reportportal/reportportal-mcp-server PR: 0
File: README.md:0-0
Timestamp: 2025-12-01T14:55:41.065Z
Learning: Applies to **/*.go : Build and compile the ReportPortal MCP Server Go application using `go build -o reportportal-mcp-server ./cmd/reportportal-mcp-server`
Applied to files:
release.dockerfile
📚 Learning: 2025-12-01T14:55:41.065Z
Learnt from: CR
Repo: reportportal/reportportal-mcp-server PR: 0
File: README.md:0-0
Timestamp: 2025-12-01T14:55:41.065Z
Learning: Applies to **/*.go : Require Go 1.24.1 or later for building the ReportPortal MCP Server
Applied to files:
release.dockerfile
📚 Learning: 2025-12-01T14:55:41.065Z
Learnt from: CR
Repo: reportportal/reportportal-mcp-server PR: 0
File: README.md:0-0
Timestamp: 2025-12-01T14:55:41.065Z
Learning: Applies to **/*.go : Set environment variables RP_HOST, RP_PROJECT, and RP_API_TOKEN for stdio mode operation, or set MCP_MODE=http with MCP_SERVER_PORT and MCP_SERVER_HOST for HTTP mode
Applied to files:
release.dockerfile
🪛 Checkov (3.2.334)
release.dockerfile
[low] 22-22: Ensure the base image uses a non latest version tag
(CKV_DOCKER_7)
[low] 1-30: Ensure that HEALTHCHECK instructions have been added to container images
(CKV_DOCKER_2)
[low] 1-30: Ensure that a user for the container has been created
(CKV_DOCKER_3)
🪛 Hadolint (2.14.0)
release.dockerfile
[warning] 22-22: Always tag the version of an image explicitly
(DL3006)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Call feature Docker build / Build and export to AWS ECR
🔇 Additional comments (2)
.goreleaser.yaml (1)
29-30: Clean removal aligns with workflow shift. The comment clearly communicates that Docker image building is now handled by Docker Buildx in the GitHub workflow, which is the intended architecture change for this PR. The goreleaser configuration remains intact for building the binaries themselves.release.dockerfile (1)
1-19: Multistage build is solid and well-organized. The build stage properly caches dependencies (go.mod download before source copy), pins Go version to 1.24.4, and includes all ldflags from the goreleaser configuration (version, commit, build date). The release workflow correctly passes build arguments to the docker build command:VERSION=${{ github.event.inputs.version }} COMMIT=${{ github.sha }} BUILD_DATE=${{ steps.build_date.outputs.timestamp }}This maintains feature parity with the previous build process while enabling better Docker layer caching. The distroless base image is a good security choice, and the container defaults to a non-root user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.