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

[CI] CI breaks due to Strings.toString() signature change in OpenSearch #2417

Closed
DarshitChanpura opened this issue Jan 26, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working ci untriaged Require the attention of the repository maintainers and may need to be prioritized

Comments

@DarshitChanpura
Copy link
Member

Security CI is broken due to a change introduced via PR opensearch-project/OpenSearch#6009

This PR introduces a change in method signature for toString() method in commons package: Strings.toString(ToXContent toXContent) to toString(MediaType mediaType, ToXContent toXContent)

Security's toString call : https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/configuration/ConfigurationRepository.java#:~:text=Strings,

OpenSearch's toString() implementation: https://github.com/opensearch-project/OpenSearch/blob/ee58457bd5a7313bab201edd38195902f859027c/server/src/main/java/org/opensearch/common/Strings.java#L715

Error details:
[2023-01-26T15:04:47,405][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [3c06300b34da.ant.amazon.com] fatal error in thread [opensearch[3c06300b34da.ant.amazon.com][generic][T#5]], exiting
java.lang.NoSuchMethodError: 'java.lang.String org.opensearch.common.Strings.toString(org.opensearch.common.xcontent.ToXContent)'
	at org.opensearch.security.configuration.ConfigurationRepository.getConfigurationsFromIndex(ConfigurationRepository.java:382) ~[?:?]
	at org.opensearch.security.configuration.ConfigurationRepository.getConfigurationsFromIndex(ConfigurationRepository.java:346) ~[?:?]
	at org.opensearch.security.dlic.rest.api.AbstractApiAction.load(AbstractApiAction.java:247) ~[?:?]
	at org.opensearch.security.dlic.rest.api.SecurityConfigAction.handleGet(SecurityConfigAction.java:79) ~[?:?]
	at org.opensearch.security.dlic.rest.api.AbstractApiAction.handleApiRequest(AbstractApiAction.java:124) ~[?:?]
	at org.opensearch.security.dlic.rest.api.PatchableResourceApiAction.handleApiRequest(PatchableResourceApiAction.java:268) ~[?:?]
	at org.opensearch.security.dlic.rest.api.SecurityConfigAction.handleApiRequest(SecurityConfigAction.java:93) ~[?:?]
	at org.opensearch.security.dlic.rest.api.AbstractApiAction.lambda$prepareRequest$2(AbstractApiAction.java:401) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
	at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:747) ~[opensearch-3.0.0-SNAPSHOT.jar:3.0.0-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1589) [?:?]
fatal error in thread [opensearch[3c06300b34da.ant.amazon.com][generic][T#5]], exiting

Solution:
Modify toString() to reflect correct signature

@DarshitChanpura DarshitChanpura added bug Something isn't working untriaged Require the attention of the repository maintainers and may need to be prioritized ci labels Jan 26, 2023
@DarshitChanpura DarshitChanpura self-assigned this Jan 26, 2023
@DarshitChanpura DarshitChanpura changed the title [CI] CI breaks due to a change introduced in OpenSearch [CI] CI breaks due to Strings.toString() signature change in OpenSearch Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci untriaged Require the attention of the repository maintainers and may need to be prioritized
Projects
None yet
Development

No branches or pull requests

2 participants