✨ [dotCLI] Improve Command Warnings and Data Safety
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
Some dotCLI commands do not adequately inform users about their actions, particularly those not performing as expected or potentially leading to data loss. For instance, the dotcli pull command does not pull folders that consist only of pages and does not inform the user of this limitation. Similarly, using dotcli push with removeFolders and removeAssets can result in data being wiped without prior warning.
Objectives
- Enhance user notifications to clearly inform about command specifics and consequences.
- Implement mandatory confirmation steps for commands that may lead to data loss.
- Update and improve documentation to reflect the command behaviors correctly.
User Story
As a dotCMS Administrator or Developer, I want to receive explicit notifications and confirmations regarding dotCLI command actions that might lead to data loss, so that I can prevent unintended consequences and ensure data integrity.
https://github.com/user-attachments/assets/55aab5ab-ba3f-4fe7-a3cb-b189a1278fa1
Acceptance Criteria
- [ ] The
dotcli pullcommand must notify the user when it skips folders containing only pages. - [ ] The
dotcli pushcommand withremoveFoldersandremoveAssetsmust warn users about potential data loss and require confirmation before proceeding. - [ ] Documentation within dotCLI help and online must be updated to clearly explain the behavior of these commands.
- [ ] Command executions that could lead to data changes should be adequately logged for audit and recovery purposes.
- [ ] Users should be able to configure safeguards against unintentional destructive actions.
Technical Details
This task involves enhancing the dotCLI, part of dotCMS' command line utilities.
Potential Challenges
- Ensuring that the warnings and confirmations are clear to all users to effectively prevent unintended operations.
- Maintaining the ease of use and efficiency of dotCLI while introducing potentially interruptive confirmation dialogues.
Impact on Existing Features
This enhancement will modify how existing dotCLI commands function by introducing new user interactions for greater safety.
Task Complexity: 3
The task involves user interface adjustments, functional enhancements, and significant documentation updates.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the dotCLI pull and push command entry points, then review their current notifications, destructive options, and confirmation behavior. Check the dotCLI help and online documentation as well; done means skipped page-only folders are reported, destructive operations require safeguards, relevant changes are logged, and the documented behavior matches the commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100