Skip to content
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

Profile datatype fixes and restrict dynamic profile endpoints to finalised versions #293

Merged
merged 9 commits into from
Mar 28, 2022

Conversation

joe-crawford
Copy link
Contributor

@joe-crawford joe-crawford commented Mar 15, 2022

- Don't validate profile structure as part of profile `/validate` endpoint
- Update profile functional tests
- gh-213 Treat custom datatypes in profiles as strings
- gh-290 Fix to loading date formats from ApiProperties
- gh-213 Add custom datatype to profile functional tests
- gh-290 Add date datatype to profile functional tests
- Add test of saving to invalid dynamic profile functional test
- Choose finalised version as default profile provider version
- Sort profile provider endpoints
@joe-crawford joe-crawford marked this pull request as draft March 15, 2022 16:22
@joe-crawford
Copy link
Contributor Author

Failing branch test looks like a timing issue.

PR includes PR #287.

@joe-crawford joe-crawford marked this pull request as ready for review March 15, 2022 17:33
Copy link
Contributor

@olliefreeman olliefreeman left a comment

Choose a reason for hiding this comment

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

wrt 290 and the not set fields... wow how did i miss that one! bug fail on me

ProfileService -> in 99% of situations where we call any method with the param finalisedOnly we're passing "true" therefore really the default to this param should now be true and the 1 location where we seem to asking for "false" (ProfileController nonProfileMetadata) should be where we pass a param of false...this is a much cleaner approach

@olliefreeman
Copy link
Contributor

Note to self....need #287 merged first unless this branch is rebased off feature/gh-277 and onto develop

- add ProfileService.validateProfileValues method and add currentValuesOnly to Profile and ProfileSection validate params
- Fix comments on PR 293
- Add latestVersionByMetadataNamespace to used and unused profile endpoints
- Make profile providers versionable and sort by default
@joe-crawford
Copy link
Contributor Author

PR has been rebased onto #287 and includes change from review of that PR.

Copy link
Contributor

@olliefreeman olliefreeman left a comment

Choose a reason for hiding this comment

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

Im happy with this.

As a word of note (and it doesnt matter for this case, but will for larger domains) using the "only validate these fields" in the Validateable class is dangerous for larger domains. The reason is that it infact validates the entire domain and then removes all field errors which dont match the requested fields.
Therefore in this case its fine as the domain is small and its not doing any complicated validation, but beware in larger domains with more complex valdiation as its will cascade the validation .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants