[Testing] Test downstream plugins that load SQL classes (alerting, skills)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- testing-qa
Direzione di ricerca
Start with ThinJarClassesTest and the thin-jar build for the SQL plugin, then read PPLQueryAction, TransportPPLQueryRequest, TransportPPLQueryResponse and PPLQueryTask to see what consumers load. The work is a CI task that installs alerting with a rebuilt thin jar and runs a PPL monitor, plus an isolated classloader check that fails on LinkageError. Done means both checks run in CI and would have caught the NoClassDefFoundError in #5923.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Our unit and integration tests check that SQL/PPL works on its own. They don't check the plugins that load SQL classes directly, so a change can pass all of our CI and still break them.
That happened in 3.10.0: #5910 added an opensearch-module interface to PPLQueryTask. All SQL CI passed, but every PPL alerting monitor crashed the node with NoClassDefFoundError (#5923, fixed in #5924). It was found in Observability stack testing, near code freeze.
Why our tests miss this
- Alerting and skills call
PPLQueryActionusing their ownopensearch-sql-thinjar. They build it from our plugin classes plus thecore,ppl, andprotocoljars, and it does not include theopensearchmodule. Their classloader therefore sees only part of our code. - Our ITs run with the whole SQL plugin on one classpath, so a class that is fine for us but broken for them always passes.
- #5924 added
ThinJarClassesTest. It only checks the four classes we know alerting loads, by reflection, so it would miss a new class or a new consumer.
Proposal
- Consumer smoke IT. Add a CI task that installs alerting (and skills, if practical) with its thin jar rebuilt from the current SQL build, then runs a PPL monitor create, an
_execute, and a scheduled run, and checks that the node stays up. This would have caught #5923 before merge. - Isolated classloader check. Build a thin jar the way alerting does. Load the consumer-facing classes in a classloader that holds only that jar plus
core/ppl/protocoland OpenSearch, and fail on anyLinkageError. This is stricter than the reflection check inThinJarClassesTest. - Document the consumer surface. List the classes other plugins load:
PPLQueryAction,TransportPPLQueryRequest,TransportPPLQueryResponse,PPLQueryTask, and any classes skills uses. Treat them as API, and note in the developer docs that they must not depend on theopensearchmodule. - Find all consumers. Check which other plugins (alerting, skills, query-insights, others) bundle SQL classes, so the tests above cover all of them.
Related
- #5923 / #5924: the regression and the fix
- opensearch-project/alerting#2322: alerting CI failed on the same regression
- Lingua principale
- Java
- Stelle
- 175
- Fork
- 233
- Merge medio
- 3g 36m
- PR unite (30g)
- 41
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opensearch-project/sql
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"Forse già presa @nagendramohan l’ha presa 85 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
opensearch-project/sql#5684 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[DOC] Calcite settings documentation missing examplesForse già presa @AzazelSensei l’ha presa 42 giorni fa. Apertadocumentation PPL
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opensearch-project/sql#4806 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
opensearch-project/sql#5927 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Analytics routing does not resolve aliases and wildcard index expressionsForse già presa @KarstenSchnitter l’ha presa 5 giorni fa. Apertaanalytic-engine bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
opensearch-project/sql#5916 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
opensearch-project/sql#5911 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opensearch-project/sql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Dans-Plugins/Medieval-Roleplay-Engine#396 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
objectionary/lints#1640 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
virtualcell/vcell#2193 ·
I maintainer di solito rispondono entro 1 giorno