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

Support idempotency on create export in the CLI. #585

Merged
merged 4 commits into from
Jan 29, 2025
Merged

Conversation

cleve-fauna
Copy link
Contributor

@cleve-fauna cleve-fauna commented Jan 29, 2025

Problem

The POST /v2/exports API supports idempotency, but this is not exposed in the CLI.

Solution

Expose it in the CLI for fauna export create via an optional --idempotency argument

Result

Customers can create idempotent exports if they desire.

Testing

Ran the tests also ran with the idempotency command locally against the production API.

You can see that:

  • not using --idempotency is properly handled (idempotent_replayed: false is in the output)
  • using it but not replaying is properly handled (idempotent_replayed: false is in the output)
  • replaying is properly handled (idempotent_replayed: true is in the output)

This proves it works as a steal thread.

Screenshot 2025-01-29 at 9 25 29 AM

@cleve-fauna cleve-fauna requested a review from a team as a code owner January 29, 2025 14:30
@cleve-fauna cleve-fauna changed the title FE-6300 Support idempontency on create export in the CLI. Support idempotency on create export in the CLI. Jan 29, 2025
Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Left some nits on the help text. Feel free to disregard as desired.

@cleve-fauna cleve-fauna requested review from jrodewig and a team January 29, 2025 15:08
@cleve-fauna cleve-fauna merged commit 2822b53 into main Jan 29, 2025
4 checks passed
@cleve-fauna cleve-fauna deleted the main_idempotency branch January 29, 2025 18:29
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