Skip to content
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

Change dyff to be kubectl diff compatible (#148) #149

Merged
merged 1 commit into from
Mar 20, 2021
Merged

Conversation

HeavyWombat
Copy link
Member

Fixes #148

Introduce special case logic to rearrange the program arguments to match
the expected dyff between --flags from to style in case the dyff is
used in the KUBECTL_EXTERNAL_DIFF

Change exit code created by dyff to be aligned with kubectl diff
expectations in terms of error codes for changes vs program errors.

Rename --set-exit-status to --set-exit-code since this is the better
terminology in shell context. Deprecate --set-exit-status flag.

Bump to github.com/gonvenience/ytbx v1.4.0 to support reading from
directories instead of just files.

Change named entry list candidates logic to optionally include extra
candidate in case the Kubernetes flag is used.

Add README section with kubectl use case.

Fixes #148

Introduce special case logic to rearrange the program arguments to match
the expected `dyff between --flags from to` style in case the `dyff` is
used in the `KUBECTL_EXTERNAL_DIFF`

Change exit code created by `dyff` to be aligned with `kubectl diff`
expectations in terms of error codes for changes vs program errors.

Rename `--set-exit-status` to `--set-exit-code` since this is the better
terminology in shell context. Deprecate `--set-exit-status` flag.

Bump to github.com/gonvenience/ytbx v1.4.0 to support reading from
directories instead of just files.

Change named entry list candidates logic to optionally include extra
candidate in case the Kubernetes flag is used.

Add README section with `kubectl` use case.
@HeavyWombat HeavyWombat changed the base branch from main to develop March 20, 2021 22:20
@codecov
Copy link

codecov bot commented Mar 20, 2021

Codecov Report

Merging #149 (edf852a) into develop (55e0c2f) will increase coverage by 0.36%.
The diff coverage is 93.61%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #149      +/-   ##
===========================================
+ Coverage    81.66%   82.03%   +0.36%     
===========================================
  Files           12       12              
  Lines         1069     1102      +33     
===========================================
+ Hits           873      904      +31     
- Misses         148      149       +1     
- Partials        48       49       +1     
Flag Coverage Δ
unittests 82.03% <93.61%> (+0.36%) ⬆️

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

Impacted Files Coverage Δ
pkg/dyff/output_human.go 78.85% <66.66%> (ø)
internal/cmd/root.go 91.17% <91.30%> (-0.50%) ⬇️
internal/cmd/common.go 76.25% <100.00%> (+1.58%) ⬆️
internal/cmd/version.go 100.00% <100.00%> (ø)
pkg/dyff/core.go 85.71% <100.00%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55e0c2f...edf852a. Read the comment docs.

@HeavyWombat HeavyWombat self-assigned this Mar 20, 2021
@HeavyWombat HeavyWombat added the enhancement New feature or request label Mar 20, 2021
@HeavyWombat HeavyWombat merged commit 903d468 into develop Mar 20, 2021
@HeavyWombat HeavyWombat deleted the fix/issue-148 branch March 20, 2021 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatiblity with KUBECTL_EXTERNAL_DIFF
1 participant