Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/133.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes issues where InfrahubClient was not properly configured for a branch when running the `infrahubctl transform`, `infrahubctl check` and `infrhubctl generator` commands.
2 changes: 1 addition & 1 deletion infrahub_sdk/ctl/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
log = logging.getLogger("infrahub")

check_summary: list[bool] = []
client = initialize_client()
client = initialize_client(branch=branch)

Check warning on line 199 in infrahub_sdk/ctl/check.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/ctl/check.py#L199

Added line #L199 was not covered by tests
for check_module in check_modules:
if check_module.definition.targets:
result = await run_targeted_check(
Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/ctl/cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
transform_config = matched[0]

# Get client
client = initialize_client()
client = initialize_client(branch=branch)

Check warning on line 338 in infrahub_sdk/ctl/cli_commands.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/ctl/cli_commands.py#L338

Added line #L338 was not covered by tests

# Get python transform class instance
try:
Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/ctl/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
if param_key:
identifier = param_key[0]

client = initialize_client()
client = initialize_client(branch=branch)

Check warning on line 46 in infrahub_sdk/ctl/generator.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/ctl/generator.py#L46

Added line #L46 was not covered by tests
if variables_dict:
data = execute_graphql_query(
query=generator_config.query,
Expand Down