-
Notifications
You must be signed in to change notification settings - Fork 182
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
(feat) O3-2753: Support multiple configurations when running assemble #895
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc: @rbuisson This is step one of the distribution changes we discussed |
Size Change: +363 B (0%) Total Size: 2.85 MB ℹ️ View Unchanged
|
vasharma05
approved these changes
Jan 22, 2024
rbuisson
approved these changes
Jan 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @ibacher . Thanks.
This was referenced Jan 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requirements
feat
,fix
, orchore
, among others). See existing PR titles for inspiration.For changes to apps
If applicable
Summary
This PR adds a couple of features to the
assemble
command of the CLI, both aimed at assisting with downstream distributions built on top of the reference application:assemble
command now supports multiple configurations, which are merged in the order they are provided, e.g.,assemble
command supports a new configuration keyfrontendModuleExcludes
, which is an array of strings of frontend modules to remove from the current configuration.frontendModuleExcludes
are applied in the order that the configuration files are specified, allowing a module to be excluded by one configuration and added by a later one. (I don't imagine there's a lot of use for more than two configuration files, but it seemed like the behaviour should be defined).spa-assemble-config.json
. This is technically a breaking change, but there is very little chance that it affects anyone, as this is a sparsely documented feature. The renaming reflects a change in goal for this file. (See below).tgz
files are now handled entirely in memory and not written to disk. This was mostly done to be able to do away with thebaseDir
property, since this was determined relative to the path of the assemble configuration file, which doesn't make a lot of sense if there are multiple files potentially from multiple directories.Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-2753
Other
(Reading this is entirely optional)
I originally added
spa-module-versions.json
in #577, with the goal of having some mechanism for tracking the versions of apps available in a distribution. With the update to esm-core V5, all app version numbers are now part of the JSON registry and in #671 I switched things so these versions are leveraged in the implementer tools.As part of O3-2753, I'm also trying to solve a long-standing problem of recording the concrete versions that make up an distribution of the O3 RefApp (and, optionally, any downstream applications). Consequently, I'm repurposing this file (which is, in essence, just the final assemble configuration) as an artifact that will be published as part of the distribution. So basically, this becomes a manifest file showing the configuration used for to generate a particular version of the Reference Application, hence the new name
spa-assemble-config.json
, which is a little clearer about its purpose.Eventually, I'm hoping to restore writing the
tgz
files to disk, but this time into some sort of proper caching directory with actual caching logic, so we don't always have to re-download everything.