Skip to content

Conversation

@iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Nov 12, 2025

Changelog Description

Heavily modified how projects are fetched in specific use cases and fixed few bugs related to it.

Additional review information

Added new method get_rest_projects_list which receives name, code active, createdAt and updatedAt data for all projects.

Modified _get_project_graphql_fields to return what fetch types has to be done to collect all requested data. GraphQl fetching supports more fields like bundle, data, usedTags, etc. Use both GraphQl and rest only if it is necessary. Added few safe guards for fetched data, e.g. "data" can be None and productTypes might not be in graphql project,

Testing notes:

  1. Using get_projects(fields={"name", "active", "data"}) won't trigger get_rest_projects.
  2. Using get_projects(fields={"name", "active", "data", "config"}) won't trigger _get_graphql_projects.
  3. Using get_projects(fields={"name", "active", "data", "config", "productTypes"}) will trigger both get_rest_projects and _get_project_graphql_fields.

@iLLiCiTiT iLLiCiTiT added the type: bug Something isn't working label Nov 12, 2025
@iLLiCiTiT iLLiCiTiT self-assigned this Nov 12, 2025
@kalisp kalisp self-requested a review November 18, 2025 11:22
Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

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

Not completely sure how to test it, but did use debugger and all assumption in description are correct.
(Actually _get_project_graphql_fields is hit in second step, but it bails early (line 644), I guess that is correct behavior.)

@iLLiCiTiT
Copy link
Member Author

There was a bug in testing descriptions _get_project_graphql_fields should be _get_graphql_projects.

@iLLiCiTiT iLLiCiTiT merged commit a62ff08 into develop Nov 18, 2025
2 checks passed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/better-project-fetching branch November 18, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants