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

Add beta support for export commands #568

Merged
merged 20 commits into from
Jan 17, 2025
Merged

Add beta support for export commands #568

merged 20 commits into from
Jan 17, 2025

Conversation

ecooper
Copy link
Contributor

@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
Member

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