Skip to content

Downloading cirrus cache to local (#461) #464

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

Merged
merged 5 commits into from
Nov 11, 2022

Conversation

ikatemart
Copy link
Contributor

No description provided.

@ikatemart ikatemart changed the title downloading cirrus cache to local (#461) Downloading cirrus cache to local (#461) Nov 9, 2022
@fkorotkov fkorotkov self-requested a review November 9, 2022 13:34

function logURL(taskId: string, command) {
return 'https://api.cirrus-ci.com/v1/task/' + taskId + '/logs/' + command.name + '.log';
}

function cacheURL(taskId: string, command, executionInfo) {
let cacheKey = executionInfo.cacheRetrievalAttempts.hits.find(hit => hit.key.startsWith(`${command.name}-`)).key;
Copy link
Contributor

Choose a reason for hiding this comment

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

find here might not actually find anything and then there will be an NPE (null pointer exception). I think it will make sense to move the find logic out of cacheURL function. Find a hit in TaskCommandRealTimeLogs and if it's there and command.type === 'CACHE' then render the button.

@fkorotkov fkorotkov merged commit 04dadc9 into cirruslabs:master Nov 11, 2022
@ikatemart ikatemart deleted the issue-461 branch November 15, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants