Skip to content
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

Fix invalid option names in Firestore backup schedule commands #7481

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

TomasMorton
Copy link
Contributor

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.

Note: This is the same PR as #7473, but not using a fork.

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 force-pushed the tm-firestore-fix-option-names branch from 6a9ba93 to 5d7fc90 Compare July 23, 2024 16:27
@TomasMorton TomasMorton marked this pull request as ready for review July 23, 2024 16:27
@TomasMorton TomasMorton force-pushed the tm-firestore-fix-option-names branch from 048d51a to 04fe083 Compare July 23, 2024 17:08
@TomasMorton TomasMorton merged commit e00df1e into master Jul 23, 2024
41 checks passed
@TomasMorton TomasMorton deleted the tm-firestore-fix-option-names branch July 23, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants