Skip to content

ESQL: Fix datasource test failures on Windows and FIPS#143417

Merged
costin merged 4 commits intoelastic:mainfrom
costin:fix/datasource-windows-fips-failures
Mar 3, 2026
Merged

ESQL: Fix datasource test failures on Windows and FIPS#143417
costin merged 4 commits intoelastic:mainfrom
costin:fix/datasource-windows-fips-failures

Conversation

@costin
Copy link
Copy Markdown
Member

@costin costin commented Mar 2, 2026

Datasource tests fail on Windows CI and FIPS CI builds due to two
independent issues introduced with the external sources feature.

Windows: StoragePath.of() cannot parse file:// URIs with
Windows drive letters. A path like file://C:\bk\path\file.txt
causes the colon after the drive letter C to be misinterpreted
as a port separator, resulting in NumberFormatException. Both the
production code (LocalStorageProvider.toStoragePath()) and the tests
construct file URIs via manual string concatenation instead of using
the existing StoragePath.fileUri() helper that normalizes Windows
paths correctly.

FIPS: ExternalDistributedSpecIT starts a test cluster with
xpack.security.enabled=false, but FIPS mode requires security to
be enabled. The Elasticsearch process dies during startup before any
test method runs. Since the test relies on plain HTTP S3 fixtures
that are inherently incompatible with FIPS, the test is now skipped
in FIPS mode.

Developed using AI-assisted tooling

@costin costin added the >bug label Mar 2, 2026
@costin costin requested a review from bpintea March 2, 2026 19:57
@elasticsearchmachine elasticsearchmachine added v9.4.0 needs:triage Requires assignment of a team area label labels Mar 2, 2026
@costin costin added :Analytics/ES|QL AKA ESQL ES|QL|DS ES|QL datasources and removed needs:triage Requires assignment of a team area label labels Mar 2, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 2, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @costin, I've created a changelog YAML for you.

costin added 3 commits March 2, 2026 22:26
StoragePath.of() failed to parse file:// URIs with Windows drive letters
(e.g. file://C:\path) because the colon after the drive letter was
interpreted as a port separator. The fix normalizes backslashes in file://
URIs and recognizes single-letter drive-letter authorities as part of the
path.

Tests and LocalStorageProvider.toStoragePath() were manually concatenating
"file://" + path.toAbsolutePath() instead of using StoragePath.fileUri()
which properly normalizes Windows paths.

ExternalDistributedSpecIT crashed in FIPS mode because the test cluster
disables security, which FIPS requires. Added a RuleChain to skip the
test in FIPS mode since it uses plain HTTP S3 fixtures.

- StoragePath: handle Windows backslashes and drive letters in file:// URIs
- LocalStorageProvider: use StoragePath.fileUri() in toStoragePath()
- LocalStorageProviderTests: use StoragePath.fileUri() for all paths
- ExternalDistributedSpecIT: skip in FIPS mode via RuleChain
- StoragePathTests: add Windows file:// URI test cases

Developed using AI-assisted tooling
Use PathUtils.get() instead of Path.of() which is forbidden in
Elasticsearch codebase.

Developed using AI-assisted tooling
@costin costin force-pushed the fix/datasource-windows-fips-failures branch from 7759d18 to 343272f Compare March 2, 2026 20:29
@costin costin enabled auto-merge (squash) March 3, 2026 07:09
@costin costin merged commit fcc173c into elastic:main Mar 3, 2026
35 checks passed
@costin costin deleted the fix/datasource-windows-fips-failures branch March 3, 2026 11:05
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 3, 2026
…cations

* upstream/main: (56 commits)
  Mute org.elasticsearch.compute.lucene.read.ValueSourceReaderTypeConversionTests testLoadAll elastic#143471
  [DOCS] Fix ES|QL function and commands lists versioning metadata (elastic#143402)
  Fix MMROperatorTests (elastic#143453)
  Fix CSV-escaped quotes in generated docs examples (elastic#143449)
  Fix SQL client parsing of array header values (elastic#143408)
  ESQL: Add extended distribution tests and fault injection for external sources (elastic#143420)
  ESQL: Fix datasource test failures on Windows and FIPS (elastic#143417)
  Add circuit breaker for query construction to prevent OOM from automaton-based queries (elastic#142150)
  Cleanup SpecIT logging configuration (elastic#143365)
  ESQL: Prune unused regex extract nodes in optimizer (elastic#140982)
  Ensure supported locale outside of Entitlements check (elastic#143405)
  feat(es|ql): add dense_vector support in coalesce (elastic#142974)
  [Test] Unmute SnapshotStressTestsIT (elastic#143359)
  Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.LookupJoinWithCoalesceFilterOnRight} elastic#143443
  Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.MvJoinKeyOnTheLookupIndex} elastic#143442
  ESQL: Fix CCS exchange sink cleanup (elastic#143325)
  Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.MvJoinKeyOnTheLookupIndexAfterStats} elastic#143434
  Mute org.elasticsearch.xpack.esql.CsvIT test {csv-spec:lookup-join.MvJoinKeyFromRow} elastic#143432
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:k8s-timeseries.Datenanos_derivative_compared_to_rate} elastic#143431
  Mute org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT test {yaml=search.retrievers/result-diversification/10_mmr_result_diversification_retriever/Test MMR result diversification single index float type} elastic#143430
  ...
tballison pushed a commit to tballison/elasticsearch that referenced this pull request Mar 3, 2026
Datasource tests fail on Windows CI and FIPS CI builds due to two
independent issues introduced with the external sources feature.

**Windows:** `StoragePath.of()` cannot parse `file://` URIs with
Windows drive letters. A path like `file://C:\bk\path\file.txt`
causes the colon after the drive letter `C` to be misinterpreted
as a port separator, resulting in `NumberFormatException`. Both the
production code (`LocalStorageProvider.toStoragePath()`) and the tests
construct file URIs via manual string concatenation instead of using
the existing `StoragePath.fileUri()` helper that normalizes Windows
paths correctly.

**FIPS:** `ExternalDistributedSpecIT` starts a test cluster with
`xpack.security.enabled=false`, but FIPS mode requires security to
be enabled. The Elasticsearch process dies during startup before any
test method runs. Since the test relies on plain HTTP S3 fixtures
that are inherently incompatible with FIPS, the test is now skipped
in FIPS mode.

Developed using AI-assisted tooling
GalLalouche pushed a commit to GalLalouche/elasticsearch that referenced this pull request Mar 3, 2026
Datasource tests fail on Windows CI and FIPS CI builds due to two
independent issues introduced with the external sources feature.

**Windows:** `StoragePath.of()` cannot parse `file://` URIs with
Windows drive letters. A path like `file://C:\bk\path\file.txt`
causes the colon after the drive letter `C` to be misinterpreted
as a port separator, resulting in `NumberFormatException`. Both the
production code (`LocalStorageProvider.toStoragePath()`) and the tests
construct file URIs via manual string concatenation instead of using
the existing `StoragePath.fileUri()` helper that normalizes Windows
paths correctly.

**FIPS:** `ExternalDistributedSpecIT` starts a test cluster with
`xpack.security.enabled=false`, but FIPS mode requires security to
be enabled. The Elasticsearch process dies during startup before any
test method runs. Since the test relies on plain HTTP S3 fixtures
that are inherently incompatible with FIPS, the test is now skipped
in FIPS mode.

Developed using AI-assisted tooling
shmuelhanoch pushed a commit to shmuelhanoch/elasticsearch that referenced this pull request Mar 4, 2026
Datasource tests fail on Windows CI and FIPS CI builds due to two
independent issues introduced with the external sources feature.

**Windows:** `StoragePath.of()` cannot parse `file://` URIs with
Windows drive letters. A path like `file://C:\bk\path\file.txt`
causes the colon after the drive letter `C` to be misinterpreted
as a port separator, resulting in `NumberFormatException`. Both the
production code (`LocalStorageProvider.toStoragePath()`) and the tests
construct file URIs via manual string concatenation instead of using
the existing `StoragePath.fileUri()` helper that normalizes Windows
paths correctly.

**FIPS:** `ExternalDistributedSpecIT` starts a test cluster with
`xpack.security.enabled=false`, but FIPS mode requires security to
be enabled. The Elasticsearch process dies during startup before any
test method runs. Since the test relies on plain HTTP S3 fixtures
that are inherently incompatible with FIPS, the test is now skipped
in FIPS mode.

Developed using AI-assisted tooling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >bug ES|QL|DS ES|QL datasources Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants