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

Add multiple component support #116

Merged
merged 7 commits into from
Oct 31, 2022

Conversation

lucian-ioan
Copy link
Collaborator

@lucian-ioan lucian-ioan commented Oct 17, 2022

Closes #63

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 17, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-28T09:30:29.995+0000

  • Duration: 3 min 42 sec

Test stats 🧪

Test Results
Failed 0
Passed 72
Skipped 0
Total 72

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@lucian-ioan lucian-ioan marked this pull request as draft October 17, 2022 13:22
@endorama
Copy link
Member

Overall the proposed solution is ok. Please fix tests and make sure this work in the case of a single component or zero components.

@lucian-ioan
Copy link
Collaborator Author

lucian-ioan commented Oct 24, 2022

Currently, components that are either not found in the config or left empty in the fragments are considered unidentified.

This is reflected in the changelog with the title and as an unidentified component field.

With additonal logic, unidentified can be split into unmatched and unspecified for components not found in the config or left empty in the fragments.

What do you think @endorama?

@endorama
Copy link
Member

I think this should be addressed with a fatal error: if a component is not matched or identified the tool should produce an error and stop processing the consolidated changelog.

We can notify users of unmatched and unspecified components in the changelog linter, at this stage we want to output correct release notes that can be reused.

@endorama
Copy link
Member

endorama commented Oct 24, 2022

Discussing how the errors should be handled we noticed there are multiple cases for components configuration based on config and fragment value. Here is the authoritative description of how the tool will manage them (will be updated during the life of this PR).

components configuration value Fragment component field value Release notes generated Effect
[] empty Not using components here, release notes should not use components.
["single"] empty We assume all fragments are using the configured component.
["single"] "foobar" Component known and with incorrect value, emit error and stop processing.
["first", "second"] empty Component unknown and cannot be assumed, emit error and stop processing.
["first", "second"] "foobar" Component known and with incorrect value, emit error and stop processing.
["first", "second"] "first" Component known and with correct value.

@lucian-ioan lucian-ioan marked this pull request as ready for review October 27, 2022 14:44
@lucian-ioan lucian-ioan merged commit 1219ee7 into elastic:main Oct 31, 2022
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.

Support multiple components in changelog renderer template
3 participants