Automate worker cache management and improve CLI output formatting#13
Merged
Automate worker cache management and improve CLI output formatting#13
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automated worker cache refreshing with TTL support, standardized CLI output formatting, and added output directory validation.
Technical Details:
workersCacheTTL(1 hour) and updated theworkersCacheEntrystruct to track timestamps. The newLoadOrRefreshWorkersCachefunction centralizes cache logic, automatically fetching fresh data from the API if the local cache is missing or stale.file,folder,user, andworkflowcommands. This removes redundant labels and colons in favor of a cleaner, more concise display.runcommand to verify the existence of the output directory when a download policy is active. A corresponding test caseTestRunCmdOutputDirValidationwas added to ensure correct error handling.t.TempDir()andconfig.SetBaseDir(). This prevents test execution from creating or modifying configuration files in the user's home directory.--refreshflag from theworker listcommand as the cache layer now handles updates automatically.