Skip to content

Fix test failure#1893

Merged
TharmiganK merged 3 commits into
ballerina-platform:masterfrom
Thevakumar-Luheerathan:fix-build-failure
Jul 2, 2026
Merged

Fix test failure#1893
TharmiganK merged 3 commits into
ballerina-platform:masterfrom
Thevakumar-Luheerathan:fix-build-failure

Conversation

@Thevakumar-Luheerathan

@Thevakumar-Luheerathan Thevakumar-Luheerathan commented Jul 2, 2026

Copy link
Copy Markdown
Member

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Fixed test cleanup in OpenAPICmdTest so generated service_type.bal is removed when service-type generation is enabled, addressing the failing test behavior.

Refreshed multiple OpenAPI expected YAML fixture files to align with updated generator output, including schema description/constraint text updates and YAML formatting normalization (date and time zone offset related cases).

Updated openapi-tool/Ballerina tool package versions and associated dependency JAR references to newer snapshots for openapi-cli, openapi-core, ballerina-to-openapi, and related tooling.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates OpenAPI generator test fixtures to match current YAML output formatting/content and adjusts test cleanup to remove an additional generated file, addressing CI test failures in openapi-cli.

Changes:

  • Refreshed multiple expected_gen OpenAPI YAML fixtures (indentless sequences, updated schema descriptions, and added ZoneOffset documentation/constraints).
  • Updated interceptor-related expected outputs for request/response interceptor scenarios.
  • Ensured service_type.bal is deleted during test cleanup in OpenAPICmdTest.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors10.yaml Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors09.yaml Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors08.yaml Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors07.yaml Updates expected OpenAPI YAML output for response interceptor scenario (formatting adjustments).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors06.yaml Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/request_interceptors/interceptors11.yaml Updates expected OpenAPI YAML output for request interceptor scenario (formatting + schema description updates).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/data_type/table_types.yaml Updates expected YAML for table type generation (formatting + schema description updates).
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint-negative/negative_date.yaml Updates expected YAML for negative constraint test (formatting + schema description updates).
openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java Deletes service_type.bal during cleanup to avoid leftover generated artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 791 to 794
File serviceTypeFile = new File(folderPath.resolve("service_type.bal").toString());
File utilFile = new File(folderPath.resolve("utils.bal").toString());
serviceTypeFile.delete();
utilFile.delete();
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 885134ad-0352-4c63-b821-fccd4b59b1b6

📥 Commits

Reviewing files that changed from the base of the PR and between 01fd21a and d15d227.

📒 Files selected for processing (5)
  • openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_0.yaml
  • openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_1.yaml
  • openapi-tool/BalTool.toml
  • openapi-tool/Ballerina.toml
  • openapi-tool/Dependencies.toml
✅ Files skipped from review due to trivial changes (4)
  • openapi-tool/Ballerina.toml
  • openapi-tool/Dependencies.toml
  • openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_0.yaml
  • openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_1.yaml

📝 Walkthrough

Walkthrough

Updates a test cleanup helper, refreshes generated OpenAPI expected YAML fixtures, and bumps OpenAPI tool package and dependency metadata.

Changes

OpenAPI CLI test fixture updates

Layer / File(s) Summary
Cleanup helper deletes service_type.bal
openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java
Adds explicit deletion of service_type.bal in the service-type cleanup path.
Schema descriptions and constraints
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint-negative/negative_date.yaml, openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/data_type/table_types.yaml, openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_0.yaml, openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_1.yaml
Reformats schema blocks and updates Date, RegDate, Pet, OptionalTimeOfDayFields, and ZoneOffset descriptions and constraint text.
Request interceptor fixture
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/request_interceptors/interceptors11.yaml
Reformats server, parameter, required-list, enum, and ZoneOffset/Civil schema blocks.
Response interceptor fixtures 06-08
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors06.yaml, openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors07.yaml, openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors08.yaml
Reformats response oneOf branches, server blocks, required lists, and schema descriptions across the three fixtures.
Response interceptor fixtures 09-10
openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors09.yaml, openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors10.yaml
Reformats response variants, query/path parameter blocks, required lists, and ZoneOffset description and constraint text.

OpenAPI tool version metadata

Layer / File(s) Summary
Tool package and dependency bump
openapi-tool/BalTool.toml, openapi-tool/Ballerina.toml, openapi-tool/Dependencies.toml
Updates tool dependency JAR paths, package version, and distribution metadata to the new release values.

Estimated code review effort: 2 (Simple) | ~15 minutes

Poem

I hop through YAML, line by line,
and tidy paths in record time.
A stray file vanishes, neat and spry,
while ZoneOffset rules reach for the sky.
Binky! The version numbers climb. 🐇

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is just the template placeholders and contains no project-specific details. Fill in the required sections with the actual purpose, goals, approach, tests, and release-note details for this PR.
Title check ❓ Inconclusive The title is generic and does not identify the actual change beyond a test fix. Use a specific title naming the failing test or code path that was fixed.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@TharmiganK TharmiganK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@TharmiganK TharmiganK merged commit c4ac47d into ballerina-platform:master Jul 2, 2026
5 checks passed
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.

3 participants