Skip to content

Conversation

@sdn4z
Copy link
Collaborator

@sdn4z sdn4z commented Nov 3, 2025

This PR increases the number of retries to be performed during the download of packages, as well as modifies the CI job to use continue-on-error and adds some tests, since the functionality is growing.

@github-actions github-actions bot added the CI label Nov 3, 2025
@sdn4z sdn4z marked this pull request as ready for review November 3, 2025 08:38
@sdn4z sdn4z requested a review from scastlara as a code owner November 3, 2025 08:38
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@sdn4z sdn4z marked this pull request as draft November 3, 2025 09:19
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@sdn4z sdn4z changed the title ci: Create constants for retry mechanism variables ci: Improve weekly download flow Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@sdn4z
Copy link
Collaborator Author

sdn4z commented Nov 3, 2025

/lgtm review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🦉 lgtm Review

Score: Nitpicks 🤓

🔍 Summary

This is a high-quality PR that significantly improves the robustness and testability of the weekly package download script.

The GitHub Actions workflow has been improved by separating the download steps and using continue-on-error for better error handling. The download script itself has been refactored for better testability and now includes a solid retry mechanism and validation for API responses.

The addition of a comprehensive test suite is a major highlight. However, I found an issue in the pagination test (test_npm_download_with_multiple_pages) where the assertions are incorrect due to how mutable dictionaries are handled by the mocking library. I've left comments with suggestions on how to fix both the application code to make it more easily testable and the test itself.

Overall, excellent work. Once the testing issue is addressed, this PR will be in great shape.

More information
  • Id: e58bb0b47d5641b790ee5aceacd46a60
  • Model: gemini-2.5-pro
  • Created at: 2025-11-03T14:08:17.016642+00:00
Usage summary
  • Request count: 2
  • Request tokens: 66,141
  • Response tokens: 13,890
  • Total tokens: 80,031

See the 📚 lgtm-ai repository for more information about lgtm.

@github-actions github-actions bot added CI and removed CI labels Nov 3, 2025
@sdn4z sdn4z marked this pull request as ready for review November 3, 2025 14:37
wait_exp_base=RETRY_WAIT_EXP_BASE,
wait_max=RETRY_WAIT_MAX,
):
with attempt, httpx.Client(timeout=TIMEOUT) as client:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does not really matter, but we could instantiate the http client once and shave off an irrelevant amount of time.

@github-actions github-actions bot added CI and removed CI labels Nov 4, 2025
@sdn4z sdn4z merged commit d7ac402 into elementsinteractive:main Nov 4, 2025
13 checks passed
@sdn4z sdn4z deleted the ci-constants branch November 4, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants