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
dotCLI: Add ability to send site variables when sending a host #28059
Comments
Some work on this has been done here |
* #28059 * #28059 Adding support for site variables when using the site related endpoints * #28059 Updating postman tests * #28059 Updating postman tests * #28059 Adding support for site variables in the CLI * #28059 Adding integration tests to the site variables functionality * #28059 Updating integrations tests * #28059 Applying sonarlint feedback --------- Co-authored-by: fabrizzio-dotCMS <fabrizzio@dotCMS.com>
we need a small improvement error handling wise I was able to push the following request
I can send dups. And the second key is the one that prevails. But since the UI prevents such situation we should do the same. We need to modify the endpoint to report an error and present it in the cli Additionally I got an error when pushing from within the sites folder whenever I do :
|
Per @wezell's comment Im passing it |
If I introduce an error in a json site descriptor like |
The HostVariableAPIImpl was refactored to make use of Google's Immutable List implementation for returned site variables in the getUniqueSiteVariables() method. We previously used an ArrayList, but have made the shift for its immutable properties and thread-safety.
* #28059 Improving duplicated variables handling. * #28059 Refactor HostVariableAPIImpl to use ImmutableList The HostVariableAPIImpl was refactored to make use of Google's Immutable List implementation for returned site variables in the getUniqueSiteVariables() method. We previously used an ArrayList, but have made the shift for its immutable properties and thread-safety.
Passing it to QA as I was able to manipulate site vars without any problem |
Fixed, able to get site variables after this change:
|
Fixed, new task related to the test improvements created here: #28543 |
Parent Issue
No response
User Story
Customers would like the ability to add site variables via the CLI - this would be helpful to customers when developing new sites.
The variables could simply be contained in a
dot_SiteVariable
property that is included in the Site.json files. We should follow the pattern we use for setting other collections. If thedotSiteVariable
is set, we sync the site variables to match what is being passed in. If thedotSiteVariable
exists and is empty, then we delete all the site variables in the target site. If thedotSiteVariable
property does not exist, we do not touch the site variables.Acceptance Criteria
It should be possible to add or edit site variables using the CLI.
Proposed Objective
Please Select
Proposed Priority
Please Select
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
Feedback from customer
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
The text was updated successfully, but these errors were encountered: