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

Add project validation to various REST API endpoints. #3359

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

mknowlton89
Copy link
Collaborator

@mknowlton89 mknowlton89 commented Nov 26, 2024

Features and Changes

As a continuation of #3354 - This PR adds project validation to the Metrics CREATE and UPDATE Rest API Endpoints, as well as the CREATE and UPDATE Environment Rest API endpoints.

Now, if an invalid/non-existent project is passed in, an error will be thrown with a contextual message.

Testing

Experiments

  • Pass in a valid project when creating a new experiment and ensure it works as expected
  • Pass in a valid project when updating an existing experiment and ensure it works as expected
  • Pass in an invalid project id when creating a new experiment and ensure an error is thrown and the experiment is not created
  • Pass in an invalid project id when updating an existing experiment and ensure an error is thrown and the experiment is not updated

Metrics

  • Pass in a valid projects array when creating a new metric and ensure it works as expected
  • Pass in a valid projects array when updating an existing metric and ensure it works as expected
  • Pass in an invalid projects array when creating a new metric and ensure an error is thrown and the metric is not created
  • Pass in an invalid projects array when updating an existing metric and ensure an error is thrown and the metric is not updated

@mknowlton89 mknowlton89 self-assigned this Nov 26, 2024
@mknowlton89 mknowlton89 marked this pull request as ready for review November 26, 2024 14:39
@mknowlton89 mknowlton89 merged commit 4794944 into main Dec 6, 2024
3 checks passed
@mknowlton89 mknowlton89 deleted the mk/rest-api-project-validation branch December 6, 2024 13:58
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.

2 participants