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

align environment variables between the SDK and infrahubctl #243

Merged
merged 1 commit into from
Jan 20, 2025
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/+align-infrahubctl-env-vars.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Aligned the environment variables used by the `infrahubctl` with the environment variables used by the SDK
8 changes: 4 additions & 4 deletions infrahub_sdk/ctl/cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ async def run(
debug: bool = False,
_: str = CONFIG_PARAM,
branch: str = typer.Option("main", help="Branch on which to run the script."),
concurrent: int = typer.Option(
4,
concurrent: int | None = typer.Option(
None,
help="Maximum number of requests to execute at the same time.",
envvar="INFRAHUBCTL_CONCURRENT_EXECUTION",
envvar="INFRAHUB_MAX_CONCURRENT_EXECUTION",
),
timeout: int = typer.Option(60, help="Timeout in sec", envvar="INFRAHUBCTL_TIMEOUT"),
timeout: int = typer.Option(60, help="Timeout in sec", envvar="INFRAHUB_TIMEOUT"),
variables: list[str] | None = typer.Argument(
None, help="Variables to pass along with the query. Format key=value key=value."
),
Expand Down
4 changes: 2 additions & 2 deletions infrahub_sdk/ctl/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def dump(
concurrent: int = typer.Option(
4,
wvandeun marked this conversation as resolved.
Show resolved Hide resolved
help="Maximum number of requests to execute at the same time.",
envvar="INFRAHUBCTL_CONCURRENT_EXECUTION",
envvar="INFRAHUB_MAX_CONCURRENT_EXECUTION",
),
timeout: int = typer.Option(60, help="Timeout in sec", envvar="INFRAHUBCTL_TIMEOUT"),
timeout: int = typer.Option(60, help="Timeout in sec", envvar="INFRAHUB_TIMEOUT"),
exclude: list[str] = typer.Option(
["CoreAccount"],
help="Prevent node kind(s) from being exported, CoreAccount is excluded by default",
Expand Down
10 changes: 6 additions & 4 deletions infrahub_sdk/ctl/importer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from asyncio import run as aiorun
from pathlib import Path

Expand All @@ -24,12 +26,12 @@ def load(
quiet: bool = typer.Option(False, help="No console output"),
_: str = CONFIG_PARAM,
branch: str = typer.Option("main", help="Branch from which to export"),
concurrent: int = typer.Option(
4,
concurrent: int | None = typer.Option(
None,
help="Maximum number of requests to execute at the same time.",
envvar="INFRAHUBCTL_CONCURRENT_EXECUTION",
envvar="INFRAHUB_MAX_CONCURRENT_EXECUTION",
),
timeout: int = typer.Option(60, help="Timeout in sec", envvar="INFRAHUBCTL_TIMEOUT"),
timeout: int = typer.Option(60, help="Timeout in sec", envvar="INFRAHUB_TIMEOUT"),
) -> None:
"""Import nodes and their relationships into the database."""
console = Console()
Expand Down
Loading