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

Backup your account without a second device #1479

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open

Conversation

codabrink
Copy link
Contributor

@codabrink codabrink commented Jan 8, 2025

@codabrink codabrink force-pushed the coda/backups branch 3 times, most recently from ff524ac to 6a2b7d0 Compare January 17, 2025 18:57
@codabrink codabrink marked this pull request as ready for review January 17, 2025 21:46
@codabrink codabrink requested a review from a team as a code owner January 17, 2025 21:46
Copy link
Contributor

@insipx insipx left a comment

Choose a reason for hiding this comment

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

i'll have to give this a deeper look later on, but it looks good, I'm not sure how it will work from webassembly from just this PR, though.

xmtp_mls/src/groups/device_sync/backup/export_stream.rs Outdated Show resolved Hide resolved
}

impl BackupOptions {
#[cfg(not(target_arch = "wasm32"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the plan for web support/how would i use this from the web?

Copy link
Contributor Author

@codabrink codabrink Jan 18, 2025

Choose a reason for hiding this comment

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

Just like how we have a handler that consumes the AsyncRead to a file for native here, we'd want to do something similar on the browser file handle.

pub use backup_importer::BackupImporter;

// Increment on breaking changes
const BACKUP_VERSION: u32 = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

what qualifies as a breaking change where we need to increment this?

Copy link
Contributor Author

@codabrink codabrink Jan 18, 2025

Choose a reason for hiding this comment

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

If we add a new optional field to one of the structs that's exported, we'd want to put some logic on the importer that says something like... If backup_version < 1, set new field to this default value, otherwise leave it be or maybe use this separate hydrater entirely. That's just one example. Really this is just a field that I'm sure will be useful to delineate between updates, and make importing old archives possible.

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.

2 participants