Skip to content

Fix invalid option names in Firestore backup schedule commands#7473

Closed
TomasMorton wants to merge 2 commits intofirebase:masterfrom
TomasMorton:tm-firestore-fix-option-names
Closed

Fix invalid option names in Firestore backup schedule commands#7473
TomasMorton wants to merge 2 commits intofirebase:masterfrom
TomasMorton:tm-firestore-fix-option-names

Conversation

@TomasMorton
Copy link
Copy Markdown
Member

@TomasMorton TomasMorton commented Jul 19, 2024

Description

Some firestore commands were incorrectly using two characters in their short option name. When passing two characters on the command line, only the first is actually parsed and checked, resulting in either unknown args or mismatched args.

Scenarios Tested

Success scenarios

  • Create backup schedule with retention and recurrence
  • Create backup schedule retention, recurrence and database (via -d)
  • Create backup schedule retention, recurrence and database (via --database)
  • List backup schedules with no arguments
  • List backup schedules with -d
  • List backup schedules with --database
  • Update backup schedule with retention

Failure scenarios

  • Create backup schedule without any args
  • Create backup schedule without retention
  • Create backup schedule with --retention but no value
  • Create backup schedule without recurrence
  • Create backup schedule with recurrence but no value
  • Create backup schedule with recurrence but invalid value
  • Create backup schedule with -d but no value
  • Create backup schedule with --database but no value
  • List backup schedule with -d but no value
  • List backup schedule with --database but no value
  • Update backup schedule with no arguments
  • Update backup schedule without retention
  • Update backup schedule with retention but no value

Sample Commands

firebase firestore:backups:schedules:create --retention 2w --recurrence DAILY
firebase firestore:backups:schedules:create --retention 2w --recurrence DAILY -d named-database
firebase firestore:backups:schedules:create --retention 2w --recurrence DAILY --database named-database

firebase firestore:backups:schedules:list
firebase firestore:backups:schedules:list -d named-database
firebase firestore:backups:schedules:list --database named-database

firebase firestore:backups:schedules:update schedule --retention 2w
@TomasMorton TomasMorton marked this pull request as ready for review July 19, 2024 18:44
Copy link
Copy Markdown
Member

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a changelog entry for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants