Fix metadata.csv integration name behavior with overrides #21836
+53
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add the option to override the integration name used in the
metadata.csvto avoid having unexpected side behavior when accessing the display name.Motivation
Recently we have updated how we handle the metadata validation when we do not have a manifest file. The manifest was used to access the
normalized_display_nameby reading theassets.integration.source_type_name. Thedisplay_nameis defined widely inddevas this variable and can be overridden by theoverrides.display-nameoption in.ddev/config.tomlfile.However, it turns out that when accessing
normalized_display_namewhich is used to validate the integration name in the metadata file, this behavior breaks. Overriding is not supported but that is completely invisible through the Integration API which seems to point out that thenormalized_display_nameis a normalized version of thedisplay_name.When updating the display name behavior and metadata validation, three integrations validation are failing in master. Turns out that for these integrations, the display name overridden from the repo overrides is used when rading
display_namebut it is intentionally left out when reading thenormalized_display_name. This is on purpose because the naming in metadata was likely already taken but the name of the integration and the new manifest version was different.In order to support this snowflake, we are adding here a
metadata_integration_nameproperty, which is the property that defines the name of the integration in the metadata file. This, by default, is the display name unless it is overridden by theoverrides.validate.metadata.integrationtable of theconf.toml. This allows supporting these snowflakes without obsfucating the behavior of thenormalize_display_nameproperty of the Integration.Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged