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

Cache the Testkube binary in the GitHub Action #4939

Closed
rangoo94 opened this issue Jan 25, 2024 · 4 comments
Closed

Cache the Testkube binary in the GitHub Action #4939

rangoo94 opened this issue Jan 25, 2024 · 4 comments
Assignees
Labels
Bug Created by Linear-GitHub Sync linear Created by Linear-GitHub Sync

Comments

@rangoo94
Copy link
Member

rangoo94 commented Jan 25, 2024

We should cache the Testkube binary using @actions/tool-cache. You may find an example in azure/setup-kubectl.

At the moment we are calling GitHub API each time, which results in the rate limit errors for frequent workflows.

@rangoo94 rangoo94 added linear Created by Linear-GitHub Sync Bug Created by Linear-GitHub Sync labels Jan 25, 2024
@devcatalin devcatalin self-assigned this Jan 25, 2024
@jmorante-ks jmorante-ks added linear Created by Linear-GitHub Sync and removed linear Created by Linear-GitHub Sync labels Jan 25, 2024
@rangoo94
Copy link
Member Author

Fixed with kubeshop/setup-testkube#4

@itsme2980
Copy link

Hi @devcatalin , @rangoo94 Thank you for the concise support regarding this feature. I've recently had the opportunity to review your implementation, and I'd like to share some comments from my perspective. This approach is only viable once Testkube is successfully installed within the GitHub Actions (GA) workflow. This means the cache is effective only when Testkube has been installed. There's a scenario where GitHub.io might impose rate limits, rejecting installation from anonymous access, rendering this caching implementation ineffective.

I propose we implement an additional feature: allowing users to define the GitHub.io Personal Access Token (PAT) within the action.yaml. This PAT could then be used to authorize with GitHub.io, overcoming potential rate-limiting issues. For more details about the token property I mentioned, you can refer to https://github.com/actions/setup-python.

The combination of a GitHub.io token and caching would be highly beneficial. 👍

@itsme2980
Copy link

Also, once the setup-testkube is executed successfully, I could not find the cache at https://<git-url>/<repo-org>/<repo-name>/actions/caches. In the build log, at Complete runner and Complete job I also couldn't find the message to store cache. Do you need any further details to help you able to trace this issue?

@rangoo94
Copy link
Member Author

rangoo94 commented Feb 1, 2024

Hi @itsme2980!

Thank you, regarding the first proposal, I have added a new ticket for that - #4965.

When it comes to cache - you won't find the cache, as we are using built-in GitHub's mechanism for caching binaries, and it's working only on self-hosted workers (@actions/tool-cache). We cannot use the actual GH cache, as it's not possible from the action level.

If you want to avoid requests to the GH API, you may also use version parameter specifically - this way, the setup-testkube won't try to find the latest release using GH API, it will only download the binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Created by Linear-GitHub Sync linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

4 participants