Skip to content

[OPIK-5336] [BE] feat: add delete configuration parameters endpoint#5986

Merged
BorisTkachenko merged 2 commits intomainfrom
boryst/OPIK-5336-be-delete-a-configuration-version-entry
Mar 31, 2026
Merged

[OPIK-5336] [BE] feat: add delete configuration parameters endpoint#5986
BorisTkachenko merged 2 commits intomainfrom
boryst/OPIK-5336-be-delete-a-configuration-version-entry

Conversation

@BorisTkachenko
Copy link
Copy Markdown
Contributor

Details

Adds a new POST /v1/private/agent-configs/blueprints/delete-keys endpoint that "deletes" configuration parameters by creating a new blueprint and closing the specified keys (setting valid_to_blueprint_id).

Changes:

  • New AgentConfigDeleteValues DTO with projectId/projectName and a Set<String> keys
  • Extracted HasProjectIdentifier interface implemented by both AgentConfigCreate and AgentConfigDeleteValues, allowing the ProjectIdentifierValidator to validate both types
  • Added deleteConfigValues method to AgentConfigService — validates config exists, closes specified keys, creates a new blueprint with description "Deleted configuration parameters: [keys]"
  • Updated resolveProjectId to accept HasProjectIdentifier instead of AgentConfigCreate
  • Added test client method and integration tests

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-5336

Testing

  • deleteConfigValues: Creates config with 3 keys, deletes 2, verifies only 1 remains in latest blueprint
  • deleteConfigValues__whenAllKeysDeleted: Deletes all keys, verifies empty values and description
  • deleteConfigValues__whenNoConfig__thenReturn404: Verifies 404 when no config exists

Documentation

N/A

@BorisTkachenko BorisTkachenko self-assigned this Mar 31, 2026
@BorisTkachenko BorisTkachenko requested a review from a team as a code owner March 31, 2026 08:10
@github-actions github-actions bot added java Pull requests that update Java code Backend tests Including test files, or tests related like configuration. labels Mar 31, 2026
Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/AgentConfigService.java Outdated
Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/AgentConfigService.java Outdated
Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/AgentConfigService.java Outdated
Comment thread apps/opik-backend/src/main/java/com/comet/opik/api/AgentConfigDeleteValues.java Outdated
Comment thread apps/opik-backend/src/main/java/com/comet/opik/domain/AgentConfigService.java Outdated
Comment thread apps/opik-backend/src/main/java/com/comet/opik/api/AgentConfigDeleteValues.java Outdated
@BorisTkachenko BorisTkachenko marked this pull request as draft March 31, 2026 09:32
@BorisTkachenko BorisTkachenko marked this pull request as ready for review March 31, 2026 09:33
@github-actions
Copy link
Copy Markdown
Contributor

Backend Tests - Integration Group 15

 27 files  +7   27 suites  +7   3m 22s ⏱️ - 2m 37s
251 tests +2  250 ✅ +3  0 💤  - 2  0 ❌ ±0  1 🔥 +1 
250 runs  +1  250 ✅ +3  0 💤  - 2  0 ❌ ±0 

For more details on these errors, see this check.

Results for commit 638a50b. ± Comparison against base commit d4d8ff0.

This pull request removes 186 and adds 188 tests. Note that renamed tests count towards both.
com.comet.opik.api.resources.v1.priv.AttachmentResourceMinIOTest ‑ deleteTraceDeletesTraceAndSpanAttachments(Consumer)[1]
com.comet.opik.api.resources.v1.priv.AttachmentResourceMinIOTest ‑ deleteTraceDeletesTraceAndSpanAttachments(Consumer)[2]
com.comet.opik.api.resources.v1.priv.AttachmentResourceMinIOTest ‑ invalidBaseUrlFormatReturnsError
com.comet.opik.api.resources.v1.priv.AttachmentResourceMinIOTest ‑ uploadAttachmentWithMultiPartPresignUrl
com.comet.opik.api.resources.v1.priv.DatasetsResourceFindProjectDatasetsTest ‑ getProjectDatasets
com.comet.opik.api.resources.v1.priv.DatasetsResourceFindProjectDatasetsTest ‑ getProjectDatasets__whenFetchingAllDatasets__thenReturnDatasetsSortedByCreatedDate
com.comet.opik.api.resources.v1.priv.DatasetsResourceFindProjectDatasetsTest ‑ getProjectDatasets__whenFetchingAllDatasets__thenReturnDatasetsSortedByValidFields(Comparator, SortingField)[10]
com.comet.opik.api.resources.v1.priv.DatasetsResourceFindProjectDatasetsTest ‑ getProjectDatasets__whenFetchingAllDatasets__thenReturnDatasetsSortedByValidFields(Comparator, SortingField)[11]
com.comet.opik.api.resources.v1.priv.DatasetsResourceFindProjectDatasetsTest ‑ getProjectDatasets__whenFetchingAllDatasets__thenReturnDatasetsSortedByValidFields(Comparator, SortingField)[12]
com.comet.opik.api.resources.v1.priv.DatasetsResourceFindProjectDatasetsTest ‑ getProjectDatasets__whenFetchingAllDatasets__thenReturnDatasetsSortedByValidFields(Comparator, SortingField)[13]
…
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenBlueprintHasMultiplePrompts__thenUpdateOnlyChangedOne
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenBlueprintHasNoPrompts__thenNoUpdate
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenBlueprintReferencesPrompt__thenAutoUpdateBlueprint(Set, String)[1]
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenBlueprintReferencesPrompt__thenAutoUpdateBlueprint(Set, String)[2]
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenIntermediateBlueprintsExist__thenAutoUpdateUsesCorrectName
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenMaskReferencesPrompt__thenNoUpdate
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenMultipleProjects__thenOnlySameProjectUpdated
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$AutomaticBlueprintUpdates ‑ createPromptVersion__whenProjectExcluded__thenBlueprintNotUpdated
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$CreateAgentConfig ‑ createAgentConfig
com.comet.opik.api.resources.v1.priv.AgentConfigsResourceTest$CreateAgentConfig ‑ createAgentConfig__nameAutoIncrements
…

@BorisTkachenko BorisTkachenko merged commit 9dd91f0 into main Mar 31, 2026
66 checks passed
@BorisTkachenko BorisTkachenko deleted the boryst/OPIK-5336-be-delete-a-configuration-version-entry branch March 31, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend java Pull requests that update Java code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants