Skip to content

Draft, on hold: Run tests on Windows #1111

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

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

mgoworko
Copy link
Collaborator

@mgoworko mgoworko commented May 13, 2025

Summary by CodeRabbit

  • Chores
    • Simplified the CI pipeline to a single Windows-based test job with Java 21 and Gradle, removing multiple previous stages and Linux container jobs.
  • Refactor
    • Standardized handling of entrypoint parameters and file paths across test utilities, now using string representations and Linux-style paths for improved consistency.
    • Introduced a utility to convert Windows-style paths to Linux-style for consistent Docker-related operations.
  • Style
    • Updated logging configuration to provide more detailed debug output for test containers.
  • Tests
    • Improved test output normalization for line endings and added a utility for displaying special characters in test outputs.

@mgoworko mgoworko marked this pull request as ready for review May 13, 2025 17:15
Copy link

coderabbitai bot commented May 13, 2025

📝 Walkthrough

Walkthrough

This update standardizes Docker entrypoint and file path handling across the codebase, shifting from os.Path to plain String for entrypoints and introducing a new linuxPath utility to normalize file paths for Linux environments. All relevant method signatures, class fields, and usages of entrypoints and paths in Docker-related utilities and containers are updated accordingly. The Azure pipeline configuration is heavily simplified, removing multiple stages and Linux-based test matrices in favor of a single Windows-based test job with Java 21 and Gradle. Additionally, logging verbosity is increased for certain components, and test output normalization is improved to handle line endings uniformly.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Pipeline as Azure Pipeline
    participant VM as Windows 2022 VM
    participant Gradle as Gradle/Test Runner

    Dev->>Pipeline: Push code to non-epic/develop/master branch
    Pipeline->>VM: Provision Windows 2022 VM
    VM->>VM: Install Java 21 (JavaToolInstaller)
    VM->>VM: Install Docker (DockerInstaller)
    VM->>Gradle: Run tests with ES_MODULE=es90x (PowerShell)
    Gradle-->>VM: Test results
    alt Test failure
        VM->>VM: Check for JVM crash logs
        VM->>Pipeline: Publish test results
    end
Loading
sequenceDiagram
    participant ScalaCode as Scala Code
    participant PathUtils as PathUtils Utility
    participant Docker as Docker-related Classes

    ScalaCode->>Docker: Set Docker entrypoint (String)
    ScalaCode->>PathUtils: Convert file path to Linux style
    PathUtils-->>ScalaCode: Return normalized path (String)
    ScalaCode->>Docker: Use normalized path in Docker commands
Loading

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
azure-pipelines.yml (1)

79-80: Missing newline at end of file

YAML files should end with a newline character.

 matrix:
   IT_es90x:
     ES_MODULE: es90x
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 80-80: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 641dd6c and 6f0f627.

📒 Files selected for processing (8)
  • azure-pipelines.yml (1 hunks)
  • ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala (1 hunks)
  • ror-tools/src/test/scala/tech/beshu/ror/tools/RorToolsAppSuite.scala (1 hunks)
  • ror-tools/src/test/scala/tech/beshu/ror/tools/utils/ExampleEsWithRorContainer.scala (1 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/EsContainerWithRorAndXpackSecurity.scala (3 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageCreator.scala (1 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageDescription.scala (3 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/Elasticsearch.scala (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/Elasticsearch.scala (1)
tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageDescription.scala (1)
  • setEntrypoint (64-66)
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[error] 80-80: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ror (Run all tests IT_es90x)
🔇 Additional comments (15)
ror-tools/src/test/scala/tech/beshu/ror/tools/RorToolsAppSuite.scala (1)

513-513: Minor whitespace addition.

Added a blank line for better readability after the assertion in the test.

ror-tools/src/test/scala/tech/beshu/ror/tools/utils/ExampleEsWithRorContainer.scala (1)

108-108: Refactored entrypoint type from Path to String.

Changed customEntrypoint from Option[Path] to Option[String], removing the Path constructor while preserving the shell command string.

tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageCreator.scala (1)

87-87: Updated entrypoint handling to match type changes.

Modified the entrypoint parameter handling to directly use the string value without Path conversion, aligning with the broader refactoring of entrypoint types from Path to String.

ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala (1)

41-41: Improved error handling to preserve exception cause.

Enhanced exception handling by preserving the original exception as the cause when wrapping in a new IllegalStateException.

tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/Elasticsearch.scala (2)

57-57: Type change from Option[Path] to Option[String] aligns with Docker conventions

This change simplifies the representation of Docker entrypoints as strings rather than Path objects, which is more aligned with how Docker itself handles entrypoints.


75-76: Updated method signature to match constructor parameter type

The signature update from Path to String is consistent with the constructor parameter change and enables a more direct representation of Docker entrypoints.

tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageDescription.scala (3)

27-27: Case class field type changed from Option[Path] to Option[String]

Simplifies the representation of Docker entrypoints, consistent with other changes. This is a good refactoring that removes unnecessary complexity.


64-66: Method signature updated to use String instead of Path

Ensures consistency with the updated field type.


78-78: Factory method parameter type updated to Option[String]

Completes the consistent type change across the entire class hierarchy. This is a thorough refactoring approach.

tests-utils/src/main/scala/tech/beshu/ror/utils/containers/EsContainerWithRorAndXpackSecurity.scala (3)

65-65: Updated parameter type to Option[String] for consistency

Aligns with similar changes in related files, ensuring a consistent approach to Docker entrypoint handling across the codebase.


84-84: Updated parameter type in private method to maintain consistency

Part of the systematic type change from Option[Path] to Option[String] throughout the codebase.


103-103: Updated parameter type in another private method

Completes the consistent type change across all methods that handle Docker entrypoints.

azure-pipelines.yml (3)

49-51: Changed test environment from Ubuntu to Windows

Switching to Windows aligns with the PR objective of testing on Windows. This is a targeted approach to verify cross-platform compatibility.


56-61: Added Java 21 installation steps for Windows

Properly configures the Windows environment with the required Java version.


62-69: Converted shell script to PowerShell for Windows compatibility

The PowerShell script appropriately handles test execution and error reporting for the Windows environment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
azure-pipelines.yml (4)

49-50: Use windows-latest image for maintainability.
The pipeline currently pins vmImage: 'windows-2022'. Switching to windows-latest ensures you automatically get updates and security patches without manually bumping the image.


79-80: Correct the test results file pattern.
The glob **/TEST*xml can miss Gradle’s default XML reports. Use a more specific pattern such as **/TEST-*.xml or **/build/test-results/**/*.xml to reliably capture all test result files.


85-86: Broaden the ES version matrix if needed.
Right now only es90x is tested. If you support multiple Elasticsearch versions, add additional entries (e.g., IT_es80x, IT_es70x) to the matrix to catch regressions across versions.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 86-86: no new line character at the end of file

(new-line-at-end-of-file)


86-86: Add a newline at end of file.
YAML linters expect a trailing newline to avoid warnings like “no new line character at the end of file.”

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 86-86: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f0f627 and 3fa1b9f.

📒 Files selected for processing (1)
  • azure-pipelines.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[error] 86-86: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ror (Run all tests IT_es90x)
🔇 Additional comments (1)
azure-pipelines.yml (1)

56-62: Verify Java 21 availability on the Windows agent.
You’re using the JavaToolInstaller@0 with jdkSourceOption: 'PreInstalled' and versionSpec: '21'. Confirm that the chosen VM image actually includes Java 21. If not, consider switching to a hosted distribution or installing from Azure’s Java distributions.

Comment on lines +68 to +75
Write-Host ">>> $env:ES_MODULE => Running testcontainers.."
.\gradlew ror-tools:test "-PesModule=$env:ES_MODULE"
if ($LASTEXITCODE -ne 0) {
Get-ChildItem -Recurse -Filter *hs_err* | ForEach-Object {
Get-Content $_.FullName
}
exit 1
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Ensure you run the full test suite.
The current PowerShell block executes only ror-tools:test. If your goal is to validate all modules, update the command to .\gradlew test (or include additional tasks). You may also add Gradle flags like --continue or --fail-fast to fine-tune failure handling.

🤖 Prompt for AI Agents (early access)
In azure-pipelines.yml around lines 68 to 75, the PowerShell script runs only
the `ror-tools:test` task, which limits test coverage to that module. To run the
full test suite, replace `.\gradlew ror-tools:test "-PesModule=$env:ES_MODULE"`
with `.\gradlew test` or add other relevant test tasks to cover all modules.
Optionally, include Gradle flags like `--continue` or `--fail-fast` to control
how test failures affect the build process.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
azure-pipelines.yml (2)

63-67: Upgrade Docker version to a supported release.
The pipeline currently pins Docker to 17.09.0-ce, which is outdated. Please upgrade to a more recent, supported version (e.g., 20.x or latest) to benefit from security fixes and new features.


68-76: Ensure full test suite coverage.
The PowerShell block still runs only .\gradlew ror-tools:test "-PesModule=$env:ES_MODULE", limiting execution to the ROR tools tests. If the goal is to validate the entire codebase on Windows, consider invoking .\gradlew test or adding additional tasks.

🧹 Nitpick comments (2)
azure-pipelines.yml (2)

49-50: Optimize pool selection for future compatibility.
Consider using the windows-latest alias instead of hardcoding windows-2022. This ensures the pipeline automatically moves to newer supported Windows images when Microsoft updates the hosted pools.


87-87: Add newline at end of file.
YAML files should end with a newline to satisfy linters and avoid parsing issues.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 87-87: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fa1b9f and 2ce52ae.

📒 Files selected for processing (2)
  • azure-pipelines.yml (1 hunks)
  • ror-tools/src/test/resources/logback.xml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • ror-tools/src/test/resources/logback.xml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[error] 87-87: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ror (Run all tests IT_es90x)
🔇 Additional comments (2)
azure-pipelines.yml (2)

56-62: Good: Switching to Java 21 on Windows.
The JavaToolInstaller@0 task correctly installs Java 21 (x64) from the pre-installed options, aligning with the project's move to Java 21. Nice improvement.


86-87: Verify module matrix scope.
The job matrix includes only ES_MODULE: es90x. Is this intentional for this Windows test, or should additional modules be added back? Please confirm the test scope.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 87-87: no new line character at the end of file

(new-line-at-end-of-file)

mgoworko added 2 commits May 14, 2025 19:44
# Conflicts:
#	ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
azure-pipelines.yml (1)

70-70: Limited test scope for only the ror-tools module
The PowerShell step invokes .\gradlew ror-tools:test, which runs tests for a single module. If you need full coverage, consider replacing it with a full-suite command like .\gradlew test.

🧹 Nitpick comments (1)
azure-pipelines.yml (1)

87-87: Add newline at end of file
YAMLLint flags a missing newline at EOF. Please add a line break after the last line.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 87-87: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce52ae and 4c19ad0.

📒 Files selected for processing (8)
  • azure-pipelines.yml (1 hunks)
  • ror-tools/src/main/scala/tech/beshu/ror/tools/RorToolsApp.scala (1 hunks)
  • ror-tools/src/test/scala/tech/beshu/ror/tools/RorToolsAppSuite.scala (32 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageCreator.scala (4 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/Elasticsearch.scala (4 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/PathUtils.scala (1 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/ReadonlyRestPlugin.scala (3 hunks)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/XpackSecurityPlugin.scala (2 hunks)
✅ Files skipped from review due to trivial changes (5)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/XpackSecurityPlugin.scala
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/PathUtils.scala
  • ror-tools/src/main/scala/tech/beshu/ror/tools/RorToolsApp.scala
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/ReadonlyRestPlugin.scala
  • ror-tools/src/test/scala/tech/beshu/ror/tools/RorToolsAppSuite.scala
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/DockerImageCreator.scala
  • tests-utils/src/main/scala/tech/beshu/ror/utils/containers/images/Elasticsearch.scala
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[error] 87-87: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ror (Run all tests IT_es90x)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
azure-pipelines.yml (1)

72-80: ⚠️ Potential issue

Critical: Test execution is limited to a single module
The script runs only .\gradlew ror-tools:test for the current ES_MODULE. This excludes other modules and risks missing regressions.

Consider running the full suite or including additional module tests. For example:

-                    .\gradlew ror-tools:test "-PesModule=$env:ES_MODULE"
+                    .\gradlew test "-PesModule=$env:ES_MODULE"
🧹 Nitpick comments (2)
azure-pipelines.yml (2)

63-70: Optional: Use built-in DockerInstaller task instead of inline script
Replacing the inline PowerShell Docker install with the Azure DevOps DockerInstaller@0 task improves idempotency and clarity.

-          - powershell: |
-              Install-WindowsFeature -Name containers -IncludeAllSubFeature -IncludeManagementTools
-              Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -IncludeManagementTools -Restart:$false
-              Set-ExecutionPolicy Bypass -Scope Process -Force
-              Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
-              Install-Package -Name docker -ProviderName DockerMsftProvider -Force
-              Start-Service docker
-              docker version
+          - task: DockerInstaller@0
+            displayName: 'Install Docker on Windows'
+            inputs:
+              dockerVersion: 'latest'
+              includePreview: false

91-91: Add newline at end of file
Ensure the file ends with a single newline character to satisfy YAML linting rules.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 91-91: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 4c19ad0 and 16f503c.

📒 Files selected for processing (1)
  • azure-pipelines.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[error] 91-91: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: ror (Run all tests IT_es90x)
🔇 Additional comments (2)
azure-pipelines.yml (2)

49-50: Approve: Windows VM image update
Switching to the windows-2022 VM image for the test job aligns with your goal of running tests on Windows Server 2022.


90-91:

❓ Verification inconclusive

Verify test matrix entries
You've narrowed the matrix to only IT_es90x. If other ES modules require Windows-based validation, please confirm or re-add them.


🏁 Script executed:

#!/bin/bash
# List matrix entries in azure-pipelines.yml to confirm modules
rg -n "matrix:" -A3 azure-pipelines.yml

Length of output: 119


Verify Windows test matrix coverage
The matrix in azure-pipelines.yml (lines 89–91) currently defines only:

matrix:
  IT_es90x:
    ES_MODULE: es90x

Please confirm whether other ES_MODULE variants still require Windows-based integration tests. If they do, re-add them; otherwise, note that their exclusion is intentional.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 91-91: no new line character at the end of file

(new-line-at-end-of-file)

IT_es81x:
ROR_TASK: integration_es81x
IT_es80x:
ROR_TASK: integration_es80x
- job:
condition: and(succeeded(), ne(variables.isEpic, true), ne(variables.isDevelop, true), ne(variables.isMaster, true))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: CI tests are skipped on develop and master branches
The condition ne(variables.isDevelop, true) and ne(variables.isMaster, true) means this job won't run on develop or master, effectively skipping CI validation on your mainline code.

Please remove or adjust these checks so that tests also run on the develop and master branches.

🤖 Prompt for AI Agents
In azure-pipelines.yml at line 47, the condition excludes running CI tests on
develop and master branches by checking ne(variables.isDevelop, true) and
ne(variables.isMaster, true). To fix this, remove these two checks from the
condition so that the job runs on develop and master branches as well, ensuring
CI validation is performed on mainline code.

Comment on lines +56 to +62
- task: JavaToolInstaller@0
displayName: Switch to Java 21
inputs:
testRunTitle: "$(ROR_TASK) results"
testResultsFiles: "**/TEST*xml"
mergeTestResults: true
strategy:
maxParallel: 99
matrix:
IT_es90x:
ROR_TASK: integration_es90x
- job:
condition: and(succeeded(), ne(variables.isEpic, true), ne(variables.isDevelop, true), ne(variables.isMaster, true))
container: openjdk:22-slim
timeoutInMinutes: 120
steps:
- checkout: self
fetchDepth: 1
clean: false
persistCredentials: true
- script: |
# Translate back env vars to avoid cyclical reference :/
export aws_access_key_id=$var_aws_access_key_id
export aws_secret_access_key=$var_aws_secret_access_key

echo "[TEST] executing ROR_TASK = $ROR_TASK"
ci/run-pipeline.sh
env:
var_aws_access_key_id: $(aws_access_key_id)
var_aws_secret_access_key: $(aws_secret_access_key)
- task: PublishTestResults@2
condition: failed()
inputs:
testRunTitle: "$(ROR_TASK) results"
testResultsFiles: "**/TEST*xml"
mergeTestResults: true
strategy:
maxParallel: 99
matrix:
IT_es818x:
ROR_TASK: integration_es818x
IT_es810x:
ROR_TASK: integration_es810x
IT_es80x:
ROR_TASK: integration_es80x
- job:
condition: and(succeeded(), or(eq(variables.isEpic, true), eq(variables.isDevelop, true), eq(variables.isMaster, true)))
timeoutInMinutes: 120
steps:
- checkout: self
fetchDepth: 1
clean: false
persistCredentials: true
- script: |
# Translate back env vars to avoid cyclical reference :/
export aws_access_key_id=$var_aws_access_key_id
export aws_secret_access_key=$var_aws_secret_access_key

echo "[TEST] executing ROR_TASK = $ROR_TASK"
ci/run-pipeline.sh
env:
var_aws_access_key_id: $(aws_access_key_id)
var_aws_secret_access_key: $(aws_secret_access_key)
versionSpec: '21'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- powershell: |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Verify Java 21 availability on the agent
The JavaToolInstaller@0 step is configured for Java 21 (versionSpec: '21'). Ensure that the windows-2022 hosted agent actually provides JDK 21, or add a fallback installation if needed.


🏁 Script executed:

#!/bin/bash
# Check available Java installations on the agent (run in a debug pipeline or local Windows VM)
java -version

Length of output: 194


Install Java 21 via JDKDownload
The windows-2022 hosted agent only ships with OpenJDK 17 by default. Using jdkSourceOption: 'PreInstalled' for version 21 will fail. Switch to JDKDownload and choose a distribution (e.g. Temurin) to ensure JDK 21 is installed:

File: azure-pipelines.yml (lines 56–62)

- task: JavaToolInstaller@0
-   displayName: Switch to Java 21
-   inputs:
-     versionSpec: '21'
-     jdkArchitectureOption: 'x64'
-     jdkSourceOption: 'PreInstalled'
+ task: JavaToolInstaller@0
+   displayName: Switch to Java 21
+   inputs:
+     versionSpec: '21'
+     jdkArchitectureOption: 'x64'
+     jdkSourceOption: 'JDKDownload'
+     jdkDistributionOption: 'Temurin'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- task: JavaToolInstaller@0
displayName: Switch to Java 21
inputs:
testRunTitle: "$(ROR_TASK) results"
testResultsFiles: "**/TEST*xml"
mergeTestResults: true
strategy:
maxParallel: 99
matrix:
IT_es90x:
ROR_TASK: integration_es90x
- job:
condition: and(succeeded(), ne(variables.isEpic, true), ne(variables.isDevelop, true), ne(variables.isMaster, true))
container: openjdk:22-slim
timeoutInMinutes: 120
steps:
- checkout: self
fetchDepth: 1
clean: false
persistCredentials: true
- script: |
# Translate back env vars to avoid cyclical reference :/
export aws_access_key_id=$var_aws_access_key_id
export aws_secret_access_key=$var_aws_secret_access_key
echo "[TEST] executing ROR_TASK = $ROR_TASK"
ci/run-pipeline.sh
env:
var_aws_access_key_id: $(aws_access_key_id)
var_aws_secret_access_key: $(aws_secret_access_key)
- task: PublishTestResults@2
condition: failed()
inputs:
testRunTitle: "$(ROR_TASK) results"
testResultsFiles: "**/TEST*xml"
mergeTestResults: true
strategy:
maxParallel: 99
matrix:
IT_es818x:
ROR_TASK: integration_es818x
IT_es810x:
ROR_TASK: integration_es810x
IT_es80x:
ROR_TASK: integration_es80x
- job:
condition: and(succeeded(), or(eq(variables.isEpic, true), eq(variables.isDevelop, true), eq(variables.isMaster, true)))
timeoutInMinutes: 120
steps:
- checkout: self
fetchDepth: 1
clean: false
persistCredentials: true
- script: |
# Translate back env vars to avoid cyclical reference :/
export aws_access_key_id=$var_aws_access_key_id
export aws_secret_access_key=$var_aws_secret_access_key
echo "[TEST] executing ROR_TASK = $ROR_TASK"
ci/run-pipeline.sh
env:
var_aws_access_key_id: $(aws_access_key_id)
var_aws_secret_access_key: $(aws_secret_access_key)
versionSpec: '21'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- powershell: |
- task: JavaToolInstaller@0
displayName: Switch to Java 21
inputs:
versionSpec: '21'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'JDKDownload'
jdkDistributionOption: 'Temurin'
- powershell: |
🤖 Prompt for AI Agents
In azure-pipelines.yml around lines 56 to 62, the JavaToolInstaller task is set
to use Java 21 with jdkSourceOption as 'PreInstalled', but the windows-2022
agent only has Java 17 preinstalled. Change jdkSourceOption to 'JDKDownload' and
specify a JDK distribution like Temurin to ensure Java 21 is downloaded and
installed during the pipeline run.

@mgoworko mgoworko changed the title Test on Windows Draft, on hold: Run tests on Windows May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant