Skip to content

feat: add standby URL, change default standby port#287

Merged
jirimoravcik merged 3 commits intomasterfrom
feat/add-standby-url-change-port
Oct 9, 2024
Merged

feat: add standby URL, change default standby port#287
jirimoravcik merged 3 commits intomasterfrom
feat/add-standby-url-change-port

Conversation

@jirimoravcik
Copy link
Copy Markdown
Member

This PR introduces a new environment variable with standby URL, it also changes the default port for the standby port env var.

@github-actions github-actions Bot added this to the 100th sprint - Platform Team milestone Oct 8, 2024
@github-actions github-actions Bot added the t-core-services Issues with this label are in the ownership of the core services team. label Oct 8, 2024
@janbuchar
Copy link
Copy Markdown
Contributor

Cool. What's the relationship between this and web_server_url or container_url?

@jirimoravcik
Copy link
Copy Markdown
Member Author

jirimoravcik commented Oct 8, 2024

Cool. What's the relationship between this and web_server_url or container_url?

web_server_url == container_url, these are unique for each run (they look something like https://someidhere.runs.apify.net/). Standby URL is the nice generic, e.g. https://super-scraper-api.apify.actor, which does automatic load balancing and scaling.

@janbuchar
Copy link
Copy Markdown
Contributor

Cool. What's the relationship between this and web_server_url or container_url?

web_server_url == container_url, these are unique for each run (they look something like https://someidhere.runs.apify.net/). Standby URL is the nice generic, e.g. https://super-scraper-api.apify.actor, which does automatic load balancing and scaling.

Understood, thanks. Could you mention the different in the field description please? And maybe update https://docs.apify.com/platform/actors/development/programming-interface/environment-variables as well?

@jirimoravcik
Copy link
Copy Markdown
Member Author

Cool. What's the relationship between this and web_server_url or container_url?

web_server_url == container_url, these are unique for each run (they look something like https://someidhere.runs.apify.net/). Standby URL is the nice generic, e.g. https://super-scraper-api.apify.actor, which does automatic load balancing and scaling.

Understood, thanks. Could you mention the different in the field description please? And maybe update docs.apify.com/platform/actors/development/programming-interface/environment-variables as well?

I tried to improve the descriptions here.

I'm already preparing a PR for docs, but I want to mention the configs in SDKs, so that's why I'm doing it first.

Copy link
Copy Markdown
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Cool, just one small note

Comment thread src/apify/_configuration.py Outdated
Co-authored-by: František Nesveda <fnesveda@users.noreply.github.com>
@jirimoravcik jirimoravcik merged commit 8cd2f2c into master Oct 9, 2024
@jirimoravcik jirimoravcik deleted the feat/add-standby-url-change-port branch October 9, 2024 09:50
] = 4321

standby_url: Annotated[
str,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In Crawlee, we use a custom URL validator function:

    url: Annotated[str, BeforeValidator(validate_http_url), Field(...)]

https://github.com/apify/crawlee-python/blob/v0.3.8/src/crawlee/_request.py#L112

@jirimoravcik Could we use the same approach here as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sure

@fnesveda fnesveda added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-core-services Issues with this label are in the ownership of the core services team. validated Issues that are resolved and their solutions fulfill the acceptance criteria.

4 participants