Skip to content

Allow specifying gateway in service configurations#1972

Merged
jvstme merged 1 commit intomasterfrom
issue_1595_gateway_in_run_conf
Nov 7, 2024
Merged

Allow specifying gateway in service configurations#1972
jvstme merged 1 commit intomasterfrom
issue_1595_gateway_in_run_conf

Conversation

@jvstme
Copy link
Copy Markdown
Collaborator

@jvstme jvstme commented Nov 7, 2024

Part of #1595

@jvstme jvstme force-pushed the issue_1595_gateway_in_run_conf branch from 82ec253 to 6199140 Compare November 7, 2024 08:16
@jvstme jvstme requested a review from un-def November 7, 2024 08:32
return v

@validator("gateway")
def validate_gateway(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this for the sake of human-readable error message? Otherwise, Optional[Union[Literal[False], str]] would do the same validation automatically (didn't check though)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I tried Union[Literal[False], str] first, but this way true passes validation and is converted to "true", which is not expected

@jvstme jvstme merged commit fc5286d into master Nov 7, 2024
@jvstme jvstme deleted the issue_1595_gateway_in_run_conf branch November 7, 2024 10:35
superprat pushed a commit to bahaal-tech/dstack that referenced this pull request Dec 20, 2024
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.

2 participants