Skip to content

Add beta support for export commands#568

Merged
ecooper merged 20 commits intomainfrom
export
Jan 17, 2025
Merged

Add beta support for export commands#568
ecooper merged 20 commits intomainfrom
export

Conversation

@ecooper
Copy link

@ecooper ecooper commented Jan 16, 2025

Problem

The Account API will soon support export APIs, and we want the CLI to surface those APIs.

Solution

Add 3 commands to support basic export functionality available in the Account API:

  • Beta notice: Add a beta warning to make sure folks know this feature is in beta and subject to change.
  • fauna export create s3: Create an export and send it to an S3 bucket.
  • fauna export list: List exports for the currently signed in user.
  • fauna export get <id>: Get the details of a current export by ID.
  • --wait: To simplify prototyping and experiencing the feature, add a --wait flag to create and get. This flag will prevent the commands from exiting until the export is in a terminal state (such as complete or failed).

Result

fauna export create s3
Screenshot 2025-01-16 at 11 55 42 AM

fauna export create s3 with --wait
Screenshot 2025-01-16 at 11 55 57 AM

fauna export list
Screenshot 2025-01-16 at 11 57 33 AM

fauna export get
Screenshot 2025-01-16 at 11 57 42 AM

Testing

Tests were added for the API and command changes.


const INITIAL_INTERVAL_MS = 1000; // 1 second
const MAX_INTERVAL_MS = 1000 * 60 * 5; // 5 minutes
const MAX_WAIT_MINS = 60 * 2; // 2 hours
Copy link
Contributor

Choose a reason for hiding this comment

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

💀

@ecooper ecooper merged commit e21e429 into main Jan 17, 2025
4 checks passed
@ecooper ecooper deleted the export branch January 17, 2025 17:06
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.

4 participants