Skip to content

Conversation

Pl217
Copy link
Contributor

@Pl217 Pl217 commented May 21, 2025

This started as I have noticed that branded IDs aren't done properly in bunch of places in the codebase, but I also did some other improvements along the way. @manelcecs, there are two TODO comments in which I wanted to point out typing issues I'd like you to improve.

@Pl217 Pl217 requested a review from a team as a code owner May 21, 2025 12:30
@Pl217 Pl217 added the needs minor changes There are review or issue comments to address label May 21, 2025
Copy link

@unocha-hpc unocha-hpc left a comment

Choose a reason for hiding this comment

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

Checks have passed and this pull request is ready for manual review

@manelcecs manelcecs changed the base branch from develop to HPC-10227 May 30, 2025 07:47
manelcecs added 2 commits May 30, 2025 09:53
Now is not exact match but 'isLike'
Reorder methods to reduce the select set

Change 'const' for 'let' to just copy the results rather than iterating over it
manelcecs added 2 commits May 30, 2025 10:18
This allow to do intersection more performant
This allow to handle all request at the same time

Which helps with the time-performance of the endpoint
Pl217 added 11 commits May 30, 2025 10:19
Using this method on branded IDs does harm, because
we lose ID branding and get generic `number` type instead
Some of ID definitions were `number` because they
predated the existence of hpc-api-core
The types of these variables are `OrganizationId | null`
and if type is correct, there is no need for nullish coalescing
This iterator is implicit when using `for...of` loop
The same thing is happening in `getOrCreate()` below
@manelcecs manelcecs force-pushed the HPC-10227 branch 2 times, most recently from 8b6621a to 991c57f Compare June 5, 2025 09:54
Base automatically changed from HPC-10227 to develop June 18, 2025 11:24
Copy link

@unocha-hpc unocha-hpc left a comment

Choose a reason for hiding this comment

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

Checks have passed and this pull request is ready for manual review

Copy link

@unocha-hpc unocha-hpc left a comment

Choose a reason for hiding this comment

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

Checks have passed and this pull request is ready for manual review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs minor changes There are review or issue comments to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants