Skip to content

Update reference-docs-links.txt to include serverless doc reference link #131175

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

Merged
merged 5 commits into from
Jul 16, 2025

Conversation

kunisen
Copy link
Contributor

@kunisen kunisen commented Jul 14, 2025

There's no gradle check but I had to run ./gradlew check.
It didn't pass but I had a hard time understand what do those error means... 🙏 Could anyone please help me with how to move things forward please?
It doesn't seem like caused by my PR to be honest and that confused me...

> Task :libs:cli:test
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar

TerminalTests > classMethod FAILED
    java.lang.AssertionError: java.lang.IllegalStateException: unexpected trailing content at line 49
        at org.elasticsearch.common.ReferenceDocs.<clinit>(ReferenceDocs.java:111)
        at org.elasticsearch.cluster.metadata.IndexMetadata.<clinit>(IndexMetadata.java:132)
        at org.elasticsearch.index.IndexSettings.<clinit>(IndexSettings.java:349)
        at org.elasticsearch.index.mapper.Mapper.lambda$static$0(Mapper.java:86)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:216)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:291)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:344)
        at org.elasticsearch.common.settings.Setting.enumSetting(Setting.java:1742)
        at org.elasticsearch.index.mapper.Mapper.<clinit>(Mapper.java:83)
        at org.elasticsearch.indices.IndicesModule.initBuiltInMetadataMappers(IndicesModule.java:255)
        at org.elasticsearch.indices.IndicesModule.<clinit>(IndicesModule.java:246)
        at org.elasticsearch.test.ESTestCase.<clinit>(ESTestCase.java:2071)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:631)

        Caused by:
        java.lang.IllegalStateException: unexpected trailing content at line 49
            at org.elasticsearch.common.ReferenceDocs.createLinkComponentEntries(ReferenceDocs.java:165)
            at org.elasticsearch.common.ReferenceDocs.readLinksBySymbol(ReferenceDocs.java:126)
            at org.elasticsearch.common.ReferenceDocs.<clinit>(ReferenceDocs.java:109)
            ... 15 more


Suite: Test class org.elasticsearch.cli.TerminalTests

Exception in thread "Thread-3" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.test.ESTestCase
        at java.base/java.lang.Thread.run(Thread.java:1583)
        Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=36, name=Thread-3, state=RUNNABLE, group=TGRP-TerminalTests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).
                at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:249)
                at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
                at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1898)
                at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
                at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2902)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.AssertionError: java.lang.IllegalStateException: unexpected trailing content at line 49 [in thread "SUITE-TerminalTests-seed#[1FAEF00971EC824A]"]
        at org.elasticsearch.common.ReferenceDocs.<clinit>(ReferenceDocs.java:111)
        at org.elasticsearch.cluster.metadata.IndexMetadata.<clinit>(IndexMetadata.java:132)
        at org.elasticsearch.index.IndexSettings.<clinit>(IndexSettings.java:349)
        at org.elasticsearch.index.mapper.Mapper.lambda$static$0(Mapper.java:86)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:216)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:291)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:344)
        at org.elasticsearch.common.settings.Setting.enumSetting(Setting.java:1742)
        at org.elasticsearch.index.mapper.Mapper.<clinit>(Mapper.java:83)
        at org.elasticsearch.indices.IndicesModule.initBuiltInMetadataMappers(IndicesModule.java:255)
        at org.elasticsearch.indices.IndicesModule.<clinit>(IndicesModule.java:246)
        at org.elasticsearch.test.ESTestCase.<clinit>(ESTestCase.java:2071)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:631)

> Task :libs:core:test
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar

Exception in thread "Thread-3" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.test.ESTestCase
        at java.base/java.lang.Thread.run(Thread.java:1583)
        Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=36, name=Thread-3, state=RUNNABLE, group=TGRP-FileAccessTreeComparisonTests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).
                at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:249)
                at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
                at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1898)
                at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
                at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2902)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.AssertionError: java.lang.IllegalStateException: unexpected trailing content at line 49 [in thread "SUITE-FileAccessTreeComparisonTests-seed#[1FAEF00971EC824A]"]
        at org.elasticsearch.common.ReferenceDocs.<clinit>(ReferenceDocs.java:111)
        at org.elasticsearch.cluster.metadata.IndexMetadata.<clinit>(IndexMetadata.java:132)
        at org.elasticsearch.index.IndexSettings.<clinit>(IndexSettings.java:349)
        at org.elasticsearch.index.mapper.Mapper.lambda$static$0(Mapper.java:86)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:216)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:291)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:344)
        at org.elasticsearch.common.settings.Setting.enumSetting(Setting.java:1742)
        at org.elasticsearch.index.mapper.Mapper.<clinit>(Mapper.java:83)
        at org.elasticsearch.indices.IndicesModule.initBuiltInMetadataMappers(IndicesModule.java:255)
        at org.elasticsearch.indices.IndicesModule.<clinit>(IndicesModule.java:246)
        at org.elasticsearch.test.ESTestCase.<clinit>(ESTestCase.java:2071)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:631)

> Task :libs:entitlement:test
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar
WARNING: module-info.class ignored in patch: /Users/kuni/Work/00_src/elasticsearch/libs/entitlement/bridge/build/distributions/elasticsearch-entitlement-bridge-9.2.0-SNAPSHOT.jar

FileAccessTreeComparisonTests > classMethod FAILED
    java.lang.AssertionError: java.lang.IllegalStateException: unexpected trailing content at line 49
        at org.elasticsearch.common.ReferenceDocs.<clinit>(ReferenceDocs.java:111)
        at org.elasticsearch.cluster.metadata.IndexMetadata.<clinit>(IndexMetadata.java:132)
        at org.elasticsearch.index.IndexSettings.<clinit>(IndexSettings.java:349)
        at org.elasticsearch.index.mapper.Mapper.lambda$static$0(Mapper.java:86)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:216)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:291)
        at org.elasticsearch.common.settings.Setting.<init>(Setting.java:344)
        at org.elasticsearch.common.settings.Setting.enumSetting(Setting.java:1742)
        at org.elasticsearch.index.mapper.Mapper.<clinit>(Mapper.java:83)
        at org.elasticsearch.indices.IndicesModule.initBuiltInMetadataMappers(IndicesModule.java:255)
        at org.elasticsearch.indices.IndicesModule.<clinit>(IndicesModule.java:246)
        at org.elasticsearch.test.ESTestCase.<clinit>(ESTestCase.java:2071)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:631)

        Caused by:
        java.lang.IllegalStateException: unexpected trailing content at line 49
            at org.elasticsearch.common.ReferenceDocs.createLinkComponentEntries(ReferenceDocs.java:165)
            at org.elasticsearch.common.ReferenceDocs.readLinksBySymbol(ReferenceDocs.java:126)
            at org.elasticsearch.common.ReferenceDocs.<clinit>(ReferenceDocs.java:109)
            ... 15 more

...
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
    Yes

  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
    It's not OS dependent. It's a doc PR-ish PR.

  • If you are submitting this code for a class then read our policy for that.
    No.

@kunisen kunisen requested a review from rjernst July 14, 2025 03:39
@kunisen kunisen self-assigned this Jul 14, 2025
@kunisen kunisen added :Core/Infra/Logging Log management and logging utilities Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. labels Jul 14, 2025
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v9.2.0 labels Jul 14, 2025
@elasticsearchmachine
Copy link
Collaborator

@kunisen please enable the option "Allow edits and access to secrets by maintainers" on your PR. For more information, see the documentation.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Jul 14, 2025
@kunisen kunisen added the >docs General docs changes label Jul 14, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Jul 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@kunisen
Copy link
Contributor Author

kunisen commented Jul 14, 2025

hmm, it's giving so many errors... I was just adding a new line without any other change...

java.lang.AssertionError: java.lang.IllegalStateException: unexpected trailing content at line 49 > java.lang.IllegalStateException: unexpected trailing content at line 49 |  

@ldematte
Copy link
Contributor

Hello @kunisen I don't think I get your intention here. That txt file contains relative URLs to docs that need to be referenced from ES error messages, and need to be defined in ReferenceDocs and accessed in the codebase from an appropriate way. What are you trying to achieve?

@ldematte ldematte removed the request for review from rjernst July 14, 2025 07:59
@ldematte ldematte removed :Core/Infra/Logging Log management and logging utilities Team:Core/Infra Meta label for core/infra team labels Jul 14, 2025
@kunisen
Copy link
Contributor Author

kunisen commented Jul 14, 2025

Thanks @ldematte for your prompt response.
I was suggested by @rjernst to raise this PR first and then use it in another one as reference in stateless PR - https://github.com/elastic/elasticsearch-serverless/pull/4155#issuecomment-3048856996

@kunisen
Copy link
Contributor Author

kunisen commented Jul 14, 2025

That txt file contains relative URLs to docs that need to be referenced from ES error messages, and need to be defined in ReferenceDocs and accessed in the codebase from an appropriate way

Could you kindly guide me how to do this in an appropriate way please? 🙏

@ldematte
Copy link
Contributor

I see.
It should be as simple as adding DEPLOY_CLOUD_DIFF_FROM_STATEFUL at the end of the ReferenceDocs enum; that should do.
Be sure you don't add trailing spaces or characters to the txt file

@kunisen
Copy link
Contributor Author

kunisen commented Jul 14, 2025

Thank you again @ldematte

It should be as simple as adding DEPLOY_CLOUD_DIFF_FROM_STATEFUL at the end of the ReferenceDocs enum; that should do.
Be sure you don't add trailing spaces or characters to the txt file

Could you kindly help me in advance to see what I did wrong please?

Actually I did the same in my first commit but it reported many errors and I made the 2nd update...
bdaffb3

@ldematte
Copy link
Contributor

You need to also add DEPLOY_CLOUD_DIFF_FROM_STATEFUL at the end of the ReferenceDocs enum, in https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/common/ReferenceDocs.java#L87

@kunisen
Copy link
Contributor Author

kunisen commented Jul 15, 2025

Thanks! Added.

@kunisen
Copy link
Contributor Author

kunisen commented Jul 15, 2025

Got some timeout errors locally... But I guess they are unrelated anyways?

image

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@kunisen kunisen enabled auto-merge (squash) July 16, 2025 02:19
@kunisen kunisen merged commit 13aceaa into main Jul 16, 2025
34 checks passed
@kunisen kunisen deleted the kunisen-pr-docsv3-1728-es branch July 16, 2025 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes external-contributor Pull request authored by a developer outside the Elasticsearch team Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. Team:Docs Meta label for docs team v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants