Skip to content

refactor(consume): avoid github api calls for direct url fixture inputs #1788

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 8 commits into from
Jun 25, 2025

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Jun 24, 2025

🗒️ Description

Simplified consume API behavior: Direct GitHub release URLs now automatically avoid GitHub API calls (better for CI), while release specifiers like stable@latest continue to use the API.

🔗 Related Issues

None

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@danceratopz danceratopz added type:feat type: Feature scope:consume Scope: Consume command suite labels Jun 24, 2025
@danceratopz danceratopz requested a review from spencer-tb June 24, 2025 11:35
Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

Thanks! Some small tweaks/suggestions on the docs below :)

We should maybe rename from --no-api-calls to something else, like --reduced/suppress-api-calls, regarding this section:

- ❌ Version specifiers always require API calls, e.g. `--input=stable@latest` (the flag is ignored).

@danceratopz danceratopz marked this pull request as draft June 25, 2025 10:13
Remove the --no-api-calls flag and instead make the behavior automatic:
- Direct GitHub release URLs: No API calls, no release page output
- Release specifiers (stable@latest): API calls required, includes release page

This provides better CI/UX without requiring additional flags.
Describe the automatic API call avoidance for direct URLs without
mentioning any flags since we implemented automatic behavior.
@danceratopz danceratopz changed the title feat(consume): add --no-api-calls to avoid using the Github API with release URL inputs refactor(consume): avoid github api calls for direct url fixture inputs Jun 25, 2025
@danceratopz danceratopz added type:refactor Type: Refactor and removed type:feat type: Feature labels Jun 25, 2025
@danceratopz
Copy link
Member Author

From @spencer-tb offline:

Could we not make it the default and remove the flag?

  • Remove the Release page: print completely as its purely cosmetic,
  • Keep the added caching logic for the release specifier (stable@latest etc -> download URL),
    Wdyt?

This suggestion makes much more sense, so I updated this PR to go with that!

@danceratopz danceratopz requested a review from spencer-tb June 25, 2025 12:51
@danceratopz danceratopz marked this pull request as ready for review June 25, 2025 12:53
Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

LGTM! Just a couple docs nits.

@spencer-tb spencer-tb merged commit d7c51a1 into main Jun 25, 2025
27 checks passed
@spencer-tb spencer-tb deleted the feat/add-consume-cache-no-api-calls branch June 25, 2025 14:06
danceratopz added a commit that referenced this pull request Jul 2, 2025
…ts (#1788)

* feat(consume): add `--no-api-calls` flag for --input=<github-release-url>

* docs(consume): update consume cache docs for the `--no-api-calls` flag

* docs(hive): align sub-section title style

* docs: update changelog

* Apply suggestions from code review

Co-authored-by: spencer <[email protected]>

* refactor(consume): simplify API behavior for direct URLs

Remove the --no-api-calls flag and instead make the behavior automatic:
- Direct GitHub release URLs: No API calls, no release page output
- Release specifiers (stable@latest): API calls required, includes release page

This provides better CI/UX without requiring additional flags.

* docs(changelog): update consume API behavior entry

Describe the automatic API call avoidance for direct URLs without
mentioning any flags since we implemented automatic behavior.

* Apply suggestions from code review

Co-authored-by: spencer <[email protected]>

---------

Co-authored-by: spencer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:consume Scope: Consume command suite type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants