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

fix: diff with not-existing WS must not fail due to defaults #702

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

GGabriele
Copy link
Collaborator

decK dynamically discovers entities defaults by interacting
with the Kong Admin API. Queries to retrieve entities schema
for a workspace that doesn't exist yet would fail though.
When running diff, in order to prevent a failure, decK simply
skips defaults injection for all entities, but it was still
wrongly running queries for plugins, making the run fail.

This PR makes sure plugins defaults injection is treated the
same as other entities when running diff against a
not-existing workspace.

Solves #697

decK dynamically discovers entities defaults by interacting
with the Kong Admin API. Queries to retrieve entities schema
for a workspace that doesn't exist yet would fail though.
When running `diff`, in order to prevent a failure, decK simply
skips defaults injection for all entities, but it was still
wrongly running queries for plugins, making the run fail.

This PR makes sure plugins defaults injection is treated the
same as other entities when running `diff` against a
not-existing workspace.
@GGabriele GGabriele requested a review from a team June 21, 2022 14:01
@codecov-commenter
Copy link

Codecov Report

Merging #702 (b8ec7b5) into main (79725fc) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #702      +/-   ##
==========================================
- Coverage   43.50%   43.49%   -0.01%     
==========================================
  Files          74       74              
  Lines        8923     8925       +2     
==========================================
  Hits         3882     3882              
- Misses       4671     4673       +2     
  Partials      370      370              
Impacted Files Coverage Δ
file/builder.go 54.38% <0.00%> (-0.15%) ⬇️

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 79725fc...b8ec7b5. Read the comment docs.

@GGabriele GGabriele requested a review from rainest July 8, 2022 17:29
@rainest rainest merged commit 2f283c7 into main Jul 8, 2022
@rainest rainest deleted the fix/diff-workspace-not-found branch July 8, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants