Goal
Evaluate the impact of deprecated legacy JavaScript syntax support in Fusion versions 5.8 and above and understand how to test existing JavaScript pipeline stages(index or query) for compatibility using interpreter options.
Environment
Fusion 5.8.0 and later, particularly 5.9.x and 5.12.x releases
Fusion deployments on Kubernetes
Guide
Understand the deprecation of legacy JavaScript syntax
Beginning with Fusion 5.8, support is deprecated for legacy JavaScript syntax in JavaScript Index and Query stages. This affects older ECMAScript versions (prior to ECMAScript 2015), which may have been used in custom scripts within pipeline stages.
If your Index or Query pipelines include legacy JavaScript in custom JavaScript stages, upgrading Fusion may result in syntax or runtime errors in affected stages.
Use interpreter selection to test compatibility
Fusion 5.9.x includes a JavaScript engine configuration setting that enables you to select between two interpreter modes on a per pipeline basis:
Default (Nashorn Legacy): Retains compatibility with older JavaScript syntax.
OpenJDK Nashorn: Aligns with the standardized JavaScript engine used in modern OpenJDK releases, which drops support for legacy features.
To test for compatibility issues without rewriting your codebase:
Open the relevant index or query pipeline.
Select the desired JavaScript stage.
Change the JavaScript interpreter to
OpenJDK Nashornin the configuration options.Run pipeline tests or ingest/query operations and observe for errors or behavioral inconsistencies.
This testing method avoids the need for manual line-by-line code review and offers a controlled way to assess impact.