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

[Coral-Hive] Add timeout for artifact resolver via ivy settings #527

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
32 changes: 28 additions & 4 deletions coral-hive/src/main/resources/ivy.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@

-->
<ivysettings>

<!-- Define timeouts for resolvers
Reference: https://ant.apache.org/ivy/history/2.5.0-rc1/settings/timeout-constraint.html

The <timeout-constraint> element allows you to define named timeout constraints that can be referenced
in other parts of the Ivy settings file, such as resolvers.

Attributes:
- name: (Required) The name of the timeout constraint.
- connectionTimeout: (Optional) Specifies the time, in milliseconds, to wait for a connection to be established.
- A value greater than 0 is used literally as the timeout.
- A value of 0 indicates no timeout (wait-forever).
- A value less than 0 lets the users of this timeout constraint decide what semantics to use.
- readTimeout: (Optional) Specifies the time, in milliseconds, to wait when reading content from a resource after a connection is established.
- A value greater than 0 is used literally as the timeout.
- A value of 0 indicates no timeout (wait-forever).
- A value less than 0 lets the users of this timeout constraint decide what semantics to use.

For large files, this setting helps avoid premature timeouts during the download process. The `readTimeout` is
applied between receiving data packets, not for the entire download process. If the server continuously sends data,
this timeout won't be triggered.
-->
<timeout-constraint name="default-timeout" connect-timeout="10000" read-timeout="30000" />

<property name="artifactory.base.url" value="http://artifactory.corp.linkedin.com:8081/artifactory"/>
<property name="artifactory.failover.url" value="http://artifactory-failover.corp.linkedin.com:8081/artifactory"/>
<caches lockStrategy="artifact-lock" />
Expand All @@ -14,28 +38,28 @@
<chain name="downloadGrapes" returnFirst="true">

<dual name="artifactory-release-resolver">
<url name="public" m2compatible="true">
<url name="public" m2compatible="true" timeout-constraint="default-timeout">
<ivy pattern="${artifactory.base.url}/release/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" />
</url>
<ibiblio name="public" m2compatible="true" root="${artifactory.base.url}/release" />
</dual>

<dual name="artifactory-release-failover-resolver">
<url name="public" m2compatible="true">
<url name="public" m2compatible="true" timeout-constraint="default-timeout">
<ivy pattern="${artifactory.failover.url}/release/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" />
</url>
<ibiblio name="public" m2compatible="true" root="${artifactory.failover.url}/release" />
</dual>

<dual name="artifactory-snapshot-resolver">
<url name="public" m2compatible="true">
<url name="public" m2compatible="true" timeout-constraint="default-timeout">
<ivy pattern="${artifactory.base.url}/snapshot/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" />
</url>
<ibiblio name="public" m2compatible="true" root="${artifactory.base.url}/snapshot" />
</dual>

<dual name="artifactory-snapshot-failover-resolver">
<url name="public" m2compatible="true">
<url name="public" m2compatible="true" timeout-constraint="default-timeout">
<ivy pattern="${artifactory.failover.url}/snapshot/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" />
</url>
<ibiblio name="public" m2compatible="true" root="${artifactory.failover.url}/snapshot" />
Expand Down
Loading