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

Api overuse #5

Closed
isage opened this issue Dec 29, 2022 · 3 comments
Closed

Api overuse #5

isage opened this issue Dec 29, 2022 · 3 comments
Assignees

Comments

@isage
Copy link

isage commented Dec 29, 2022

  1. https://github.com/termux/upload-release-action/blob/master/src/uploadToRelease.ts#L29
    By default, listReleaseAssets returns 30 items per page. We have 124 assets, so that's 5 pages => 5 api calls by paginate. And that's per artifact.
    This can be raised to 100 per page, thus lowering to just 2 api calls per artifact

  2. Maybe listReleaseAssets can be run and cached once before starting upload. Though, that'll fail if you somehow sequentially upload two artifacts with same name. So maybe config flag to enable caching?

@isage isage mentioned this issue Dec 29, 2022
@thunder-coding thunder-coding self-assigned this Dec 29, 2022
@thunder-coding
Copy link
Member

Can you try v4.0.2. I've attempted to fix the issue. I hope it does make difference

@isage
Copy link
Author

isage commented Dec 29, 2022

Thanks, that was fast. Already testing.

@isage
Copy link
Author

isage commented Dec 29, 2022

Yep, that definitely helped.
Some stats:
Before action run: "used": 116
After action run: "used": 488,

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

No branches or pull requests

2 participants