Add Docker metadata coverage#3548
Conversation
📝 WalkthroughWalkthroughThis PR updates the Dockerfile to add a ChangesDocker build and CI trigger update
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Merging this PR will improve performance by 14.2%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | test_perf_deep_nested |
5.1 s | 4.3 s | +17.59% |
| ⚡ | WallTime | test_perf_complex_refs |
1.9 s | 1.6 s | +17.44% |
| ⚡ | WallTime | test_perf_large_models_pydantic_v2 |
3.5 s | 3 s | +16.5% |
| ⚡ | WallTime | test_perf_duplicate_names |
1,013 ms | 873.8 ms | +15.93% |
| ⚡ | WallTime | test_perf_all_options_enabled |
5.2 s | 4.5 s | +15.34% |
| ⚡ | WallTime | test_perf_multiple_files_input |
3.4 s | 3 s | +14.06% |
| ⚡ | WallTime | test_perf_openapi_large |
2.8 s | 2.5 s | +13.11% |
| ⚡ | WallTime | test_perf_stripe_style_pydantic_v2 |
1.9 s | 1.7 s | +11.06% |
| ⚡ | WallTime | test_perf_kubernetes_style_pydantic_v2 |
2.5 s | 2.2 s | +10.95% |
| ⚡ | WallTime | test_perf_aws_style_openapi_pydantic_v2 |
1.8 s | 1.6 s | +10.29% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing docker/metadata-paths (d4405b3) with main (33476e6)
Footnotes
-
98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
📚 Docs Preview: https://pr-3548.datamodel-code-generator.pages.dev |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Dockerfile (1)
18-25: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider a default for
VERSIONto avoid empty label metadata.
ARG VERSIONhas no default, so a manualdocker build(without--build-arg VERSION=...) will bake an emptyorg.opencontainers.image.versionlabel.♻️ Proposed fix
-ARG VERSION +ARG VERSION=unknown🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` around lines 18 - 25, The Dockerfile’s VERSION build argument is currently unset by default, which can produce an empty org.opencontainers.image.version label during a plain docker build. Update the ARG VERSION declaration to provide a sensible default, and keep the LABEL block using VERSION so manual builds still emit valid image metadata.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Dockerfile`:
- Around line 18-25: The Dockerfile’s VERSION build argument is currently unset
by default, which can produce an empty org.opencontainers.image.version label
during a plain docker build. Update the ARG VERSION declaration to provide a
sensible default, and keep the LABEL block using VERSION so manual builds still
emit valid image metadata.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f70f5fee-9f83-4722-b9a3-2320dbfc8529
📒 Files selected for processing (2)
.github/workflows/docker.yamlDockerfile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3548 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 161 161
Lines 34363 34363
Branches 4011 4011
=========================================
Hits 34363 34363
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Breaking Change AnalysisResult: No breaking changes detected Reasoning: The PR only modifies CI/build infrastructure: This analysis was performed by Claude Code Action |
|
🎉 Released in 0.67.0 This PR is now available in the latest release. See the release notes for details. |
Summary by CodeRabbit