Skip to content
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

[Bug]: check-config-migration-metadata fails on specific case #2553

Open
guillaumerochelle opened this issue Dec 4, 2024 · 1 comment · May be fixed by #2641
Open

[Bug]: check-config-migration-metadata fails on specific case #2553

guillaumerochelle opened this issue Dec 4, 2024 · 1 comment · May be fixed by #2641
Assignees
Labels
bug Something isn't working priority:medium

Comments

@guillaumerochelle
Copy link
Contributor

guillaumerochelle commented Dec 4, 2024

Package name

components

Package version

11.3.4

Reproduction steps

There seem to be a bug in the builder check-config-migration-metadata.
Let's suppose you have metadata for a configuration interface with no properties:

[
  {
    "library": "@lib/components",
    "name": "MyConfig",
    "path": "packages/@lib/components/configuration.ts"
    "runtime": true,
    "type": "APPLICATION",
    "properties": []
  }
]

If a property is added to MyConfig, the metadata becomes:

[
  {
    "library": "@lib/components",
    "name": "MyConfig",
    "path": "packages/@lib/components/configuration.ts"
    "runtime": true,
    "type": "APPLICATION",
    "properties": [
      {
        "description": "My image path",
        "label": "Image path",
        "name": "imagePath",
        "type": "string",
        "value": "img/path/name.jpg"
      }
    ]
  }
]

Current result

The metadata-checks builder will throw an error mentioning that:
Property @lib/components#MyConfig has been modified but is not documented in the migration document.

To be able to pass the check, we need to document that the config has been deleted, which isn't correct.

{
  "version": "1.0.0",
  "changes": [
    {
      "contentType": "CONFIG",
      "before": {
        "libraryName": "@lib/components"
        "configName": "MyConfig"
      }
    }
  ]
}

Expected result

A new property has been added so nothing should be documented.

Additional comments

No response

@guillaumerochelle guillaumerochelle added bug Something isn't working triage labels Dec 4, 2024
@matthieu-crouzet
Copy link
Contributor

We should also filter configuration without properties from the metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium
Projects
None yet
2 participants