Repository navigation
test(integ-test): gate time-bounds pruning ITs to the OpenSearch route and security plugin - #5785
Conversation
…route and the security plugin CalciteTimeBoundsPruningIT and TimeBoundsPruningSecurityIT (added in opensearch-project#5766) carried no gates, so integTestRemote failed them on clusters the tests were never meant for: the analytics-engine route does not observe the request-level pruning, and the security IT drives the security REST API, which does not exist without the plugin. Add the TIME_BOUNDS_PRUNING capability and annotate both classes with @RequiresCapability so they skip on the analytics-engine route, and assume the security plugin in TimeBoundsPruningSecurityIT.init() exactly like the sibling security ITs. Verified against four remote clusters: OpenSearch + security passes both classes (15/15), OpenSearch without security passes the Calcite class and skips the security one, and both analytics-engine clusters skip both classes. Signed-off-by: menwe <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (63.24%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #5785 +/- ##
=========================================
Coverage 63.24% 63.24%
Complexity 8820 8820
=========================================
Files 938 938
Lines 40209 40209
Branches 4530 4530
=========================================
Hits 25432 25432
Misses 13955 13955
Partials 822 822
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
CalciteTimeBoundsPruningITandTimeBoundsPruningSecurityIT(added in #5766) run on everyintegTestRemotetarget today, but they are meant for specific clusters: the pruning is observable on the OpenSearch route only, and the security IT drives the security plugin's REST API. Against a remote cluster they were never meant for, both fail rather than skip:CalciteTimeBoundsPruningITTimeBoundsPruningSecurityITPUT /_plugins/_security/api/roles/...has no handler (400)Field [...] not found.rejections are never raisedThis change gates both classes with the two mechanisms the suite already uses for exactly these two situations:
Capability.TIME_BOUNDS_PRUNING, with@RequiresCapability(TIME_BOUNDS_PRUNING)on both classes, soCapabilityRuleskips them on the analytics-engine route. The javadoc records the observed gap: on that route a field mapped only in an out-of-range index still resolves and an index that does not map the time field is not dropped.ClusterPlugins.requirePluginOrAssume(SECURITY_PLUGIN, ...)at the top ofTimeBoundsPruningSecurityIT.init(), the same assumptionPPLPermissionsIT,PartialResultSecurityITandSQLCursorPermissionsITcarry, so the class skips where the security plugin is not installed.Test-only change; no production code is touched.
Verification (
integTestRemote --testsfor the two classes, 15 test methods, against four remote 5-shard clusters running the plugin built frommainat12c26dccd):opensearch-security plugin not installed on test cluster)TIME_BOUNDS_PRUNING: ...)TIME_BOUNDS_PRUNING: ...)CalciteTimeBoundsPruningITis also a member of theCalciteNoPushdownITsuite; the class-level annotation is read by the sameCapabilityRule, as for the other gated members of that suite, but the suite run was not repeated separately for this change.Related Issues
Follow-up to #5766. No linked issue: the failures were observed in remote-cluster runs that CI does not execute.
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.