Skip to content

Add Docker metadata coverage#3548

Merged
koxudaxi merged 1 commit into
mainfrom
docker/metadata-paths
Jul 2, 2026
Merged

Add Docker metadata coverage#3548
koxudaxi merged 1 commit into
mainfrom
docker/metadata-paths

Conversation

@koxudaxi

@koxudaxi koxudaxi commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Expanded container image metadata with standard labels, including version, description, license, source, and title.
    • Updated automated workflow path monitoring so relevant test data changes trigger the existing pull request checks.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates the Dockerfile to add a VERSION build argument and replaces the single maintainer label with a set of OCI image metadata labels. It also adds a test JSON schema file path to the docker CI workflow's pull_request trigger paths.

Changes

Docker build and CI trigger update

Layer / File(s) Summary
Dockerfile OCI labels and workflow trigger path
Dockerfile, .github/workflows/docker.yaml
Adds ARG VERSION and multi-line OCI image labels (description, license, source, title, version) in place of the old maintainer label; adds tests/data/jsonschema/simple_string.json to the workflow's watched paths.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main theme: adding Docker metadata labels and related workflow path coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docker/metadata-paths

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.

@codspeed-hq

codspeed-hq Bot commented Jul 2, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 14.2%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 10 improved benchmarks
✅ 1 untouched benchmark
⏩ 98 skipped benchmarks1

Performance Changes

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)

Open in CodSpeed

Footnotes

  1. 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.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📚 Docs Preview: https://pr-3548.datamodel-code-generator.pages.dev

@koxudaxi koxudaxi marked this pull request as ready for review July 2, 2026 16:39
@koxudaxi koxudaxi enabled auto-merge (squash) July 2, 2026 16:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Dockerfile (1)

18-25: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a default for VERSION to avoid empty label metadata.

ARG VERSION has no default, so a manual docker build (without --build-arg VERSION=...) will bake an empty org.opencontainers.image.version label.

♻️ 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

📥 Commits

Reviewing files that changed from the base of the PR and between 33476e6 and d4405b3.

📒 Files selected for processing (2)
  • .github/workflows/docker.yaml
  • Dockerfile

@koxudaxi koxudaxi merged commit 26f7507 into main Jul 2, 2026
58 checks passed
@koxudaxi koxudaxi deleted the docker/metadata-paths branch July 2, 2026 16:49
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (33476e6) to head (d4405b3).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: The PR only modifies CI/build infrastructure: .github/workflows/docker.yaml gains an additional trigger path (tests/data/jsonschema/simple_string.json), and the Dockerfile adds an ARG VERSION and OCI image metadata labels (description, licenses, source, title, version) to the existing LABEL instruction. No changes touch generated code output, Jinja2 templates, CLI options, the Python API, default behavior, supported Python versions, or error handling. The only deleted line is the original single-value LABEL maintainer=..., which is preserved and extended in the new multi-value LABEL — not a removal of user-facing functionality. Therefore there are no breaking changes.


This analysis was performed by Claude Code Action

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🎉 Released in 0.67.0

This PR is now available in the latest release. See the release notes for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant