Skip to content

Extend interal call cache window for safty#2318

Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Feb 19, 2026
Merged

Extend interal call cache window for safty#2318
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

This PR invites

// VeryLongDuration is a duration for very long-term cache

  • VeryLongDuration = 300 * time.Second

and apply it to some internal API calls to enhance API call stability (especially for Azure API call)

Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings February 19, 2026 04:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new cache duration constant VeryLongDuration (300 seconds) and applies it to internal API calls for lookup operations involving relatively static cloud provider metadata (VM specifications, images, pricing information, and region/zone availability). The purpose is to enhance API call stability, particularly for Azure API calls, by extending the cache window from 5 seconds (MediumDuration) to 300 seconds for these lookup operations.

Changes:

  • Added VeryLongDuration constant (300 seconds) to client package for very long-term caching
  • Updated cache duration for spec lookup operations (LookupSpecList, LookupSpec, LookupPriceList, GetAvailableRegionZonesForSpec) from MediumDuration to VeryLongDuration
  • Updated cache duration for image lookup operations (lookupRegularImageOnly, LookupMyImage) from MediumDuration to VeryLongDuration

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/core/common/client/client.go Defines new VeryLongDuration constant (300 seconds) for very long-term caching
src/core/resource/spec.go Updates cache duration for spec and price lookup operations to use VeryLongDuration
src/core/resource/image.go Updates cache duration for regular image lookup to use VeryLongDuration
src/core/resource/customimage.go Updates cache duration for custom image lookup to use VeryLongDuration
Comments suppressed due to low confidence (1)

src/core/common/client/client.go:72

  • The comment contains a spelling error: "safty" should be "safety". Additionally, the comment should be corrected to "very long-term cache" for consistency with other duration comments.
	// VeryLongDuration is a duration for very long-term cache
	VeryLongDuration = 300 * time.Second

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@seokho-son
Copy link
Copy Markdown
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Feb 19, 2026
@cb-github-robot cb-github-robot merged commit 8ad9b85 into cloud-barista:main Feb 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This PR is approved and will be merged soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants