Skip to content

Conversation

@wvandeun
Copy link
Contributor

@wvandeun wvandeun commented Nov 11, 2024

fixes #133

additionally fixes the same issue for infrahubctl check and infrahubctl generator commands.

@wvandeun wvandeun self-assigned this Nov 11, 2024
@codecov
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/ctl/check.py 0.00% 1 Missing ⚠️
infrahub_sdk/ctl/cli_commands.py 0.00% 1 Missing ⚠️
infrahub_sdk/ctl/generator.py 0.00% 1 Missing ⚠️
@@           Coverage Diff           @@
##           stable     #134   +/-   ##
=======================================
  Coverage   64.34%   64.34%           
=======================================
  Files          75       75           
  Lines        6893     6893           
  Branches     1365     1365           
=======================================
  Hits         4435     4435           
  Misses       2103     2103           
  Partials      355      355           
Flag Coverage Δ
python-3.10 43.34% <0.00%> (ø)
python-3.11 43.34% <0.00%> (ø)
python-3.12 43.34% <0.00%> (ø)
python-3.9 43.29% <0.00%> (ø)
python-filler-3.12 23.85% <0.00%> (ø)

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

Files with missing lines Coverage Δ
infrahub_sdk/ctl/check.py 27.00% <0.00%> (ø)
infrahub_sdk/ctl/cli_commands.py 35.96% <0.00%> (ø)
infrahub_sdk/ctl/generator.py 21.56% <0.00%> (ø)

Copy link
Contributor

@dgarros dgarros left a comment

Choose a reason for hiding this comment

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

Looks good, would be good to add a newsfragment to include it in the release note

@wvandeun wvandeun force-pushed the wvd-20241111-fix-infrahubctl-transform-branch branch from 0ab85fa to fa3f84d Compare November 11, 2024 12:41
Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

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

We're sending the branch when initializing the transport class a bit further down.

I'd imagine that some parts work now but that it might load the schema from the wrong branch etc without this fix. Looks like we might have the same issue for Checks and Generators just base on how the client is initialized.

        transform = get_transform_class_instance(
            transform_config=transform_config,
            branch=branch,
            client=client,
        )

@wvandeun wvandeun requested a review from ogenstad November 11, 2024 13:20
@wvandeun wvandeun changed the title sets branch on InfrahubClient when running infrahubctl transform sets branch on InfrahubClient when running infrahubctl transform infahubctl check and infrahubctl generator Nov 11, 2024
@wvandeun wvandeun force-pushed the wvd-20241111-fix-infrahubctl-transform-branch branch from eba6f2f to 799405c Compare November 12, 2024 06:16
@wvandeun wvandeun merged commit a5a134b into stable Nov 12, 2024
12 checks passed
@wvandeun wvandeun deleted the wvd-20241111-fix-infrahubctl-transform-branch branch November 12, 2024 06:43
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.

4 participants