Skip to content

feat: add --build flag to diff command#694

Merged
kakkoyun merged 2 commits into
mainfrom
kakkoyun/add_diff_build
Sep 11, 2025
Merged

feat: add --build flag to diff command#694
kakkoyun merged 2 commits into
mainfrom
kakkoyun/add_diff_build

Conversation

@kakkoyun

@kakkoyun kakkoyun commented Sep 3, 2025

Copy link
Copy Markdown
Member

Add --build flag to orchestrion diff command to build and diff in one step.
This provides a quality of life improvement for orchestrion.yaml authors
by eliminating the need for separate build and diff commands.

Usage: orchestrion diff --build ./...
Replaces: orchestrion go build -work ./... && orchestrion diff /work/dir

Fixes #692

Signed-off-by: Kemal Akkoyun [email protected]

@github-actions github-actions Bot added the conventional-commit/feat Feature work label Sep 3, 2025
@kakkoyun
kakkoyun marked this pull request as ready for review September 11, 2025 11:14
@kakkoyun
kakkoyun requested a review from a team as a code owner September 11, 2025 11:14

Copilot AI 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.

Pull Request Overview

This PR adds a --build flag to the orchestrion diff command that allows users to build and diff in one step, eliminating the need for separate build and diff commands.

  • Adds a new --build flag to execute a build with -work before generating the diff
  • Refactors the diff command logic into separate functions for better modularity
  • Implements work directory extraction from build output to automatically capture the build workspace

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@eliottness eliottness left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Optional nit: write at least one test but I know this is hard so if you tested it locally and don't feel like it. Your explicit go is enough.

Comment thread internal/cmd/diff.go Outdated
Comment thread internal/cmd/diff.go Outdated
@kakkoyun

Copy link
Copy Markdown
Member Author

Optional nit: write at least one test but I know this is hard so if you tested it locally and don't feel like it. Your explicit go is enough.

I'll add some tests

Add --build flag to orchestrion diff command to build and diff in one step.
This provides a quality of life improvement for orchestrion.yaml authors
by eliminating the need for separate build and diff commands.

Usage: orchestrion diff --build ./...
Replaces: orchestrion go build -work ./... && orchestrion diff /work/dir

Fixes #692

Signed-off-by: Kemal Akkoyun <[email protected]>
@kakkoyun
kakkoyun force-pushed the kakkoyun/add_diff_build branch from 6f65f55 to f796dba Compare September 11, 2025 15:22
@kakkoyun
kakkoyun enabled auto-merge September 11, 2025 15:23
@kakkoyun
kakkoyun added this pull request to the merge queue Sep 11, 2025
Merged via the queue into main with commit 6d4d01e Sep 11, 2025
55 checks passed
@kakkoyun
kakkoyun deleted the kakkoyun/add_diff_build branch September 11, 2025 16:20
@codecov

codecov Bot commented Sep 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.79439% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.19%. Comparing base (e061d12) to head (f796dba).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
internal/cmd/diff.go 45.79% 58 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #694      +/-   ##
==========================================
+ Coverage   65.72%   67.19%   +1.47%     
==========================================
  Files         113      113              
  Lines        7926     8014      +88     
==========================================
+ Hits         5209     5385     +176     
+ Misses       2192     2107      -85     
+ Partials      525      522       -3     
Components Coverage Δ
Generators 80.24% <ø> (ø)
Instruments ∅ <ø> (∅)
Go Driver 76.51% <ø> (+0.69%) ⬆️
Toolexec Driver 70.85% <100.00%> (+3.32%) ⬆️
Aspects 74.30% <100.00%> (+2.39%) ⬆️
Injector 74.85% <100.00%> (+2.06%) ⬆️
Job Server 66.72% <ø> (+0.80%) ⬆️
Other 67.19% <48.21%> (+1.47%) ⬆️
Files with missing lines Coverage Δ
internal/cmd/diff.go 39.83% <45.79%> (+39.83%) ⬆️

... and 28 files with indirect coverage changes

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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add orchestrion build --diff

3 participants