Skip to content

Conversation

DanielRyanSmith
Copy link
Collaborator

@DanielRyanSmith DanielRyanSmith commented Oct 13, 2025

Part of #5498

This change adds two changes to the shipping features endpoint:

  • Changes the URL to send requests to the endpoint so the milestone argument is not redundantly provided twice.
  • Reduces the feature information provided in the response to only include the URL to the feature. After trying this endpoint on prod, sending all of the fields of the feature for each feature is just too much unneeded information and makes the response hard to read.

Copy link
Collaborator

@jcscottiii jcscottiii left a comment

Choose a reason for hiding this comment

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

Thanks for making this change! Reducing the API response to only the feature URL makes a lot of sense for improving performance and readability. The URL change also helps simplify the endpoint.

The code looks good to me. I've verified that the logic changes in shipping_features_api.py are correctly reflected in the updated tests in shipping_features_api_test.py.

This PR was reviewed by Gemini.

Copy link
Collaborator

@jrobbins jrobbins left a comment

Choose a reason for hiding this comment

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

LGTM after one change.


if feature.feature_type == FEATURE_TYPE_CODE_CHANGE_ID:
# PSA features do not require intents or approvals.
feature_dict = converters.feature_entry_to_json_verbose(feature)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you still need feature_dict? Avoiding this call would avoid more NDB operations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, good catch - I did not remove this line

@DanielRyanSmith DanielRyanSmith added this pull request to the merge queue Oct 13, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2025
@DanielRyanSmith DanielRyanSmith added this pull request to the merge queue Oct 14, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 14, 2025
* less feature information in shipping features API

* fix tests

* revert temporary test change

* remove unused line
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2025
@DanielRyanSmith DanielRyanSmith added this pull request to the merge queue Oct 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2025
@DanielRyanSmith DanielRyanSmith added this pull request to the merge queue Oct 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2025
@DanielRyanSmith DanielRyanSmith added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit ec53ac8 Oct 14, 2025
7 of 9 checks passed
@DanielRyanSmith DanielRyanSmith deleted the shipping-features-api-fix branch October 14, 2025 20:16
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.

3 participants