Skip to content

Improve how the cache service availability is determined in actions/toolkit #2099

@Link-

Description

@Link-

For the purposes of GHES, we have a isFeatureAvailable() check that runs when attempting to use the cache service.

This function returns true if ACTIONS_CACHE_URL is set as an environment variable in the runner. ACTIONS_CACHE_URL points to the ArtifactCache service URL and is determined and passed to the runner by run-service or Actions Service.

In run-service, this value is defined in the Kubernetes manifests. In Actions Service, a call to MPS determines the value of this URL.

We need to modify the condition for isFeatureAvailable so that it's no longer only dependent on the value of ACTIONS_CACHE_URL but leverages the ACTIONS_CACHE_SERVICE_V2 feature flag as well.

Exit Criteria

  1. Even if ACTIONS_CACHE_URL is not set isFeatureAvailable() would use another way to determine the availability of the cache service
  2. Change the log level of failures from warning to error

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions