dotCMS / dotCMS/core

✨ [dotCLI] Improve Command Warnings and Data Safety

Open
#31,742 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Scout
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 pull command must notify the user when it skips folders containing only pages.
  • [ ] The dotcli push command with removeFolders and removeAssets must 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.