Skip to content

Fix and unmute testIndexSettingProviderPrivateSetting#134861

Merged
felixbarny merged 3 commits intoelastic:mainfrom
felixbarny:fix-index-setting-provider-tests
Sep 18, 2025
Merged

Fix and unmute testIndexSettingProviderPrivateSetting#134861
felixbarny merged 3 commits intoelastic:mainfrom
felixbarny:fix-index-setting-provider-tests

Conversation

@felixbarny
Copy link
Copy Markdown
Member

This was caused by setting a shard limit of 1 while the test tried to add two shards. This means there's no bug and just needed to adjust the min number of allowed shards.

The full exception:

java.lang.AssertionError: did not expect private setting to be rejected when added via IndexSettingProvider
        at __randomizedtesting.SeedInfo.seed([B43A90546411F38E:EEF2F3C88AEDD197]:0)
        at org.elasticsearch.test.ESTestCase.fail(ESTestCase.java:2726)
        at org.elasticsearch.cluster.metadata.MetadataCreateIndexServiceTests.lambda$testIndexSettingProviderPrivateSetting$60(MetadataCreateIndexServiceTests.java:1837)
        at org.elasticsearch.cluster.metadata.MetadataCreateIndexServiceTests.withTemporaryClusterService(MetadataCreateIndexServiceTests.java:1886)
        at org.elasticsearch.cluster.metadata.MetadataCreateIndexServiceTests.testIndexSettingProviderPrivateSetting(MetadataCreateIndexServiceTests.java:1816)

        Caused by:
        org.elasticsearch.common.ValidationException: Validation Failed: 1: this action would add [2] shards, but this cluster currently has [0]/[1] maximum normal shards open; for more information, see https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/size-shards?version=master#troubleshooting-max-shards-open;
            at app//org.elasticsearch.indices.ShardLimitValidator.validateShardLimit(ShardLimitValidator.java:117)
            at app//org.elasticsearch.cluster.metadata.MetadataCreateIndexService.aggregateIndexSettings(MetadataCreateIndexService.java:1284)
            at app//org.elasticsearch.cluster.metadata.MetadataCreateIndexService.applyCreateIndexRequestWithV1Templates(MetadataCreateIndexService.java:670)
            at app//org.elasticsearch.cluster.metadata.MetadataCreateIndexService.applyCreateIndexRequest(MetadataCreateIndexService.java:494)
            at app//org.elasticsearch.cluster.metadata.MetadataCreateIndexService.applyCreateIndexRequest(MetadataCreateIndexService.java:512)
            at app//org.elasticsearch.cluster.metadata.MetadataCreateIndexServiceTests.lambda$testIndexSettingProviderPrivateSetting$60(MetadataCreateIndexServiceTests.java:1835)

Closes #134846

@felixbarny felixbarny added >test Issues or PRs that are addressing/adding tests :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. labels Sep 17, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v9.2.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Sep 17, 2025
@felixbarny felixbarny enabled auto-merge (squash) September 17, 2025 06:24
Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Felix!

@felixbarny felixbarny merged commit 3b2fcc1 into elastic:main Sep 18, 2025
34 checks passed
@felixbarny felixbarny deleted the fix-index-setting-provider-tests branch September 18, 2025 09:03
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
szybia added a commit to szybia/elasticsearch that referenced this pull request Sep 18, 2025
* upstream/main: (43 commits)
  Unmute testAckedIndexing to see if it still fails on main (elastic#134682)
  Silence time zone ID deprecation warning for JDK 25 due to log4j2 bug. (elastic#134719)
  Adding a getUnmodifiableSourceAndMetadata() method to IngestDocument (elastic#134816)
  Mark the create-index-from-source action as publicly available on Serverless (elastic#134953)
  ESQL: Rename command from INLINESTATS to INLINE STATS (elastic#134827)
  Document multi index query support for simplified retrievers (elastic#134980)
  [ML] Fix YAMl test to use correct query parameter type (elastic#134999)
  [Transform] Wait for PIT to close (elastic#134955)
  Add XPath to XmlUtils (elastic#134923)
  Fixing conditional processor mutability bugs (elastic#134936)
  [Transform] Lower loglevel of 3 transform-related error messages from ERROR to WARN (elastic#134985)
  Unmute pattern text tests. (elastic#134981)
  Integrate weights into simplified RRF retriever syntax (elastic#132680)
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:stats.CountDistinctWithConditions} elastic#134993
  Update periodic java-ea build to test java 26 pre-release (elastic#134983)
  Mute org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT test {csv-spec:stats.CountDistinctWithConditions} elastic#134984
  Fix and unmute testIndexSettingProviderPrivateSetting (elastic#134861)
  Add missing common cat params (elastic#134870)
  Support querying multiple indices with the simplified RRF retriever (elastic#134822)
  Allow including semantic field embeddings in _source (elastic#134717)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Data Management (obsolete) DO NOT USE. This team no longer exists. >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] MetadataCreateIndexServiceTests testIndexSettingProviderPrivateSetting failing

3 participants