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

[OPIK-314] Create prompt version endpoint #554

Merged
merged 18 commits into from
Nov 5, 2024

Conversation

thiagohora
Copy link
Contributor

@thiagohora thiagohora commented Nov 4, 2024

Details

  • Add Create prompt version endpoint

Issues

OPIK-314

@thiagohora thiagohora self-assigned this Nov 4, 2024
@thiagohora thiagohora force-pushed the thiagohora/OPIK-314_create_version_endpoint branch from f6dc040 to 98690af Compare November 4, 2024 20:16
Base automatically changed from thiagohora/OPIK-310_expose_get_prompts_api to main November 5, 2024 12:23
@thiagohora thiagohora marked this pull request as ready for review November 5, 2024 12:37
@thiagohora thiagohora requested a review from a team as a code owner November 5, 2024 12:37
Copy link
Contributor

@idoberko2 idoberko2 left a comment

Choose a reason for hiding this comment

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

Great work! Left two minor comments

private EntityAlreadyExistsException newConflict(String alreadyExists) {
log.info(alreadyExists);
return new EntityAlreadyExistsException(new ErrorMessage(alreadyExists));
return new EntityAlreadyExistsException(new ErrorMessage(409, alreadyExists));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return new EntityAlreadyExistsException(new ErrorMessage(409, alreadyExists));
return new EntityAlreadyExistsException(new ErrorMessage(HttpStatus.SC_CONFLICT, alreadyExists));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will address both comments in the following PR once I rebase it

@@ -85,6 +88,14 @@ class PromptResourceTest {

private static final WireMockUtils.WireMockRuntime wireMock;
public static final String[] IGNORED_FIELDS = {"versionCount", "latestVersion", "template"};
public static final String TEMPLATE = """
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to introduce this duplicate and not use PromptVersionManufacturer.TEMPLATE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I probably forgot to remove it.

@thiagohora thiagohora merged commit a186a36 into main Nov 5, 2024
7 checks passed
@thiagohora thiagohora deleted the thiagohora/OPIK-314_create_version_endpoint branch November 5, 2024 13:56
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