Skip to content

[MS-604] Fix SDK selection for configurations with a mix of restricted and unrestricted SDKs#846

Merged
BurningAXE merged 1 commit into
release/2024.2.0from
MS-604-Incorrect-age-threshold-rejection
Aug 5, 2024
Merged

[MS-604] Fix SDK selection for configurations with a mix of restricted and unrestricted SDKs#846
BurningAXE merged 1 commit into
release/2024.2.0from
MS-604-Incorrect-age-threshold-rejection

Conversation

@BurningAXE
Copy link
Copy Markdown
Contributor

@BurningAXE BurningAXE commented Jul 31, 2024

Previous implementation where AllowedAgeRange for SDKs was optional had issues when the project has a mix of restricted and unrestricted SDKs. I found the cleanest way to solve this to be to make AllowedAgeRange always present. So, when an SDK is unrestricted it will have a range of [0, null) which is the same as the previous null value. This affects mostly conversion from API to domain models and domain models to/from Proto. I don't anticipate any issues but I'm a little nervous about migrations - have I missed anything?
To fix the bug I also changed the implementation of allowedAgeRanges() and isAgeRestricted() - they will now account for empty age ranges of unrestricted SDKs. I think I've covered it but this might affect any component using these functions so again - have I missed anything?

@cla-bot cla-bot Bot added the ... label Jul 31, 2024
@BurningAXE BurningAXE force-pushed the MS-604-Incorrect-age-threshold-rejection branch from ea345c2 to 1aca64b Compare July 31, 2024 17:46
@meladRaouf
Copy link
Copy Markdown
Collaborator

@BurningAXE I have created this test case to be executed after your PR is merged

@BurningAXE BurningAXE force-pushed the MS-604-Incorrect-age-threshold-rejection branch 2 times, most recently from 891a1f5 to bfdfd49 Compare August 1, 2024 12:14
@BurningAXE BurningAXE changed the title [MS-604] Fix SDK selection for configurations with a mix of restricte… [MS-604] Fix SDK selection for configurations with a mix of restricted and unrestricted SDKs Aug 1, 2024
@BurningAXE BurningAXE marked this pull request as ready for review August 1, 2024 12:31
@BurningAXE BurningAXE requested review from a team, TristramN, alex-vt, alexandr-simprints, luhmirin-s and ybourgery and removed request for a team August 1, 2024 12:31
@BurningAXE BurningAXE force-pushed the MS-604-Incorrect-age-threshold-rejection branch from bfdfd49 to 8530a37 Compare August 1, 2024 17:18
@BurningAXE BurningAXE requested a review from meladRaouf August 1, 2024 17:19
* of the project's face and fingerprint SDK configurations.
* Note that some of these age groups might be unsupported!
*/
fun ProjectConfiguration.sortedUniqueAgeGroups(): List<AgeGroup> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This function can now be tested directly ;)

@BurningAXE BurningAXE force-pushed the MS-604-Incorrect-age-threshold-rejection branch from 8530a37 to 4c9da8e Compare August 5, 2024 12:35
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Aug 5, 2024

@BurningAXE BurningAXE merged commit f1a0891 into release/2024.2.0 Aug 5, 2024
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.

3 participants