Skip to content

Conversation

@notque
Copy link
Contributor

@notque notque commented Nov 14, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates from a multi-index architecture (separate indexes per tenant) to a single consolidated datastream with document-level tenant isolation using a tenant_ids field.

Key Changes:

  • Introduced document-level tenant isolation via tenant_ids field in OpenSearch queries
  • Added validateTenantID() function to enforce tenant ID validation across all query operations
  • Refactored indexName() to return a hardcoded "hermes" datastream name instead of generating per-tenant index names

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/storage/util.go Added tenant validation function and error constants; refactored indexName() to return single datastream name
pkg/storage/opensearch.go Updated query building to include tenant isolation filters; added tenant validation to all query methods
build/coverprofile.out Updated test coverage data (auto-generated file)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/SAP-cloud-infrastructure/hermez/pkg/storage 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/SAP-cloud-infrastructure/hermez/pkg/storage/opensearch.go 0.00% (ø) 0 0 0
github.com/SAP-cloud-infrastructure/hermez/pkg/storage/util.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

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