Skip to content

Conversation

@dimovpetar
Copy link
Member

No description provided.

@dimovpetar dimovpetar marked this pull request as draft October 21, 2025 11:50
@dimovpetar dimovpetar force-pushed the feat_run_manifest_validation branch 4 times, most recently from c0f9c6b to 85d48a7 Compare October 28, 2025 13:56
@dimovpetar dimovpetar force-pushed the feat_run_manifest_validation branch 2 times, most recently from 9ee721e to b1ed71b Compare October 30, 2025 08:30
@coveralls
Copy link

coveralls commented Oct 30, 2025

Pull Request Test Coverage Report for Build 19666892989

Details

  • 110 of 112 (98.21%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 82.266%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/ui5Manifest.ts 47 49 95.92%
Totals Coverage Status
Change from base Build 19648105994: 0.9%
Covered Lines: 1111
Relevant Lines: 1255

💛 - Coveralls

@dimovpetar dimovpetar marked this pull request as ready for review October 30, 2025 14:16
@alexandar-mitsev
Copy link
Member

Looks good to me

@dimovpetar dimovpetar force-pushed the feat_run_manifest_validation branch from 6ee3a30 to 0f4d9df Compare November 3, 2025 12:11
Copy link
Member

@alexandar-mitsev alexandar-mitsev left a comment

Choose a reason for hiding this comment

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

  • now I often get "The MCP validation tool timed out". Seems that it happens mainly if I ask to validate a manifest, complete the task, then edit the manifest and ask to validate again.
    Maybe it is related to the mutex log and cache. Or to the ajv tool itself
    If I restart VS code, the tool can run again without a timeout. Also it runs smoothly couple of times in the same task. But fails with timeout if it runs in two different tasks in the same window.

  • every time when I validate manifest _version: "1.60.0" - I get an error
    Error:
    Failed to create UI5 manifest validate function: items value must be ["object","boolean"]

  • some older manifests are in the mapping, but have no tag for them, e.g. 1.50.0, 1.45.0
    we should think of how to improve the tool to handle this. Maybe suggest an upgrade in that case as well?

  • there are many logs for format "uri" ignored and format "uri-reference" ignored in the console, but this is not an error. Can be resolved with later update

@dimovpetar
Copy link
Member Author

now I often get "The MCP validation tool timed out". Seems that it happens mainly if I ask to validate a manifest, complete the task, then edit the manifest and ask to validate again.
Maybe it is related to the mutex log and cache. Or to the ajv tool itself
If I restart VS code, the tool can run again without a timeout. Also it runs smoothly couple of times in the same task. But fails with timeout if it runs in two different tasks in the same window.

Fixed it, it was caused by not releasing the mutex when fetching external schemas, particularly the Adaptive cards schema.

every time when I validate manifest _version: "1.60.0" - I get an error
Error:
Failed to create UI5 manifest validate function: items value must be ["object","boolean"]

The reason behind that is that UI5 Manifest schemas prior 1.68.0 are using older version of the meta schema. Our setup doesn't support it. I have added an error and hint whenever such old version of manifest is encountered, to suggest upgrade to a newer one.

some older manifests are in the mapping, but have no tag for them, e.g. 1.50.0, 1.45.0
we should think of how to improve the tool to handle this. Maybe suggest an upgrade in that case as well?

Now, upgrade is suggested if version lower than 1.68.0 is encountered.

There are many logs for format "uri" ignored and format "uri-reference" ignored in the console, but this is not an error. Can be resolved with later update

Resolved it. There is dedicated package that contains those formats, called "ajv-formats".

Copy link
Member

@alexandar-mitsev alexandar-mitsev left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@RandomByte
Copy link
Member

every time when I validate manifest _version: "1.60.0" - I get an error
Error:
Failed to create UI5 manifest validate function: items value must be ["object","boolean"]

The reason behind that is that UI5 Manifest schemas prior 1.68.0 are using older version of the meta schema. Our setup doesn't support it. I have added an error and hint whenever such old version of manifest is encountered, to suggest upgrade to a newer one.

some older manifests are in the mapping, but have no tag for them, e.g. 1.50.0, 1.45.0
we should think of how to improve the tool to handle this. Maybe suggest an upgrade in that case as well?

Now, upgrade is suggested if version lower than 1.68.0 is encountered.

@MatthiasSchmalz fyi, in case you have any comments or suggestions we would highly appreciate it. Otherwise we will go forward with this setup

CC: @codeworrior

@MatthiasSchmalz
Copy link

@RandomByte
I think it is ok to not support old legacy versions, but the error messages should be understandable.
"Failed to create UI5 manifest validate function: items value must be ["object","boolean"]" is not understandable.
"Can't validate manifest, because schema version < 1.68.0 is not supported" would be understandable.

However 1.67.0 is not very old, so a lot of consumers might still use it.
Do you want to suggest updating the schema but keeping an older minUI5Version? That doesn't feel so good as it can cause invalid combinations (at least Fiori Pipelines could complain about this).
Is the effort to support the old meta version that big?

const fetchSchemaMutex = new Mutex();

let UI5ToManifestVersionMapping: Record<string, string> | null = null;
const MAPPING_URL = "https://raw.githubusercontent.com/SAP/ui5-manifest/main/mapping.json";
Copy link
Member

Choose a reason for hiding this comment

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

The main branch is missing versions >=2

Suggested change
const MAPPING_URL = "https://raw.githubusercontent.com/SAP/ui5-manifest/main/mapping.json";
const MAPPING_URL = "https://raw.githubusercontent.com/SAP/ui5-manifest/v2/mapping.json";

Copy link
Member

Choose a reason for hiding this comment

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

I assumed that when v2 is productively released, it will go in the main branch and then we will have it. Not sure if we need to use v2 before its stable release

Copy link
Member

Choose a reason for hiding this comment

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

@MatthiasSchmalz can you please clarify?

Copy link
Member

Choose a reason for hiding this comment

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

The colleagues also found that https://raw.githubusercontent.com/SAP/ui5-manifest/v2/mapping.json is missing the latest UI5 releases such as 1.142

Choose a reason for hiding this comment

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

@RandomByte v2 is currently in the v2 branch, while main still contains v1. We have no explicit timeline yet, when this will be switched as UI5 2 is also not released yet.
Due to this, main branch only maps to v1 schemas. You are right that we might need a better way to map this, Peter recently started a discussion here.

Yes in v2 the mapping does not contain the latest version. In the past we had only added an entry, when a new schema version is available. You can use the rule to take the highest available mapping. But yes, somehow we have entries for 1.139 and 1.138 without a new version as well.
@aleksandr-suvorov do you know why this is the case?

Copy link
Member

Choose a reason for hiding this comment

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

@MatthiasSchmalz:

My understanding is that the availability of a manifest version 2.x is not tightly coupled to a UI5 2.x release.
The manifest version is already supported since UI5 1.136 and the best practice is to adjust the manifest to this version.

In general, I'm not happy with such a complex logic to be able to validate a manifest. I would highly appreciate an API from @ui5/manifest that takes care of all of the mentioned logic and specialities. Adding the code here will not only require all other places that want to validate a manifest to add the same logic, but also makes future changes on your end very cumbersome and error prone, especially as there is no versioning (requests are just sent to the branches main / v2).

Copy link
Member

Choose a reason for hiding this comment

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

For reference, this is the UI5 Language Assistant implementation to support manifest v2: SAP/ui5-language-assistant#754

Choose a reason for hiding this comment

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

@RandomByte yes, the release of V2 is now coupled with the releases of legacy free versions, which might not be optimal, I will prepare intermediate versions also.
@matz3 ui5 manifest provides schema validation, but right now this functionality is not exposed in the API. We could reconsider it, expose and use it here, because basically we do it with the same tools and the same way.

Copy link
Member

@matz3 matz3 left a comment

Choose a reason for hiding this comment

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

The architecture document should also be updated to reflect the new changes, especially the new dependencies to external services.

throw new Error(
errorMessage +
(supportedVersions ?
`\nSupported versions are: ${supportedVersions.join(", ")}.` :
Copy link
Member

Choose a reason for hiding this comment

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

This gave me the following versions:

Manifest version '1.0.0' is not supported. Please upgrade to a newer one.
Supported versions are: 1.81.0, 1.81.0, 1.80.0, 1.79.0, 1.78.0, 1.77.0, 1.76.0, 1.75.1, 1.73.1, 1.72.3, 1.72.0, 1.70.1, 1.69.0, 1.68.0.

  • What about 2.0.0? Isn't that version also supported? It is not listed here.
  • 1.81.0 is listed twice

@dimovpetar
Copy link
Member Author

@RandomByte I think it is ok to not support old legacy versions, but the error messages should be understandable. "Failed to create UI5 manifest validate function: items value must be ["object","boolean"]" is not understandable. "Can't validate manifest, because schema version < 1.68.0 is not supported" would be understandable.

However 1.67.0 is not very old, so a lot of consumers might still use it. Do you want to suggest updating the schema but keeping an older minUI5Version? That doesn't feel so good as it can cause invalid combinations (at least Fiori Pipelines could complain about this). Is the effort to support the old meta version that big?

Hello @MatthiasSchmalz ,

The error now looks like
"Manifest version '1.67.2' is not supported. Please upgrade to a newer one.
Supported versions are: 1.81.0, 1.81.0, 1.80.0, 1.79.0, 1.78.0, 1.77.0, 1.76.0, 1.75.1, 1.73.1, 1.72.3, 1.72.0, 1.70.1, 1.69.0, 1.68.0."

This tool focuses on performing validation based on concrete schema. minUI5Version value does not differ per schema. It is something that we can discuss to add on top, but not in the initial release. Same goes for supporting versions < 1.68.0.

@dimovpetar dimovpetar force-pushed the feat_run_manifest_validation branch from 7673deb to 6c7eae5 Compare November 25, 2025 09:42
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.

7 participants