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

feat(cloning): add calls to archive/restore/delete clones #1578

Merged
merged 34 commits into from Sep 23, 2022

Conversation

jost-s
Copy link
Contributor

@jost-s jost-s commented Sep 15, 2022

Summary

  • add an App Request to archive a clone cell (clone is not callable/visible any longer)
  • add an Admin Request to restore an archived clone cell
  • add an Admin Request to delete all archived clone cells of an app's role (e. g. there is a base cell with role document and clones document.0, document.1 etc.; this call deletes all clones that have been archived permanently; not undoable, clones cannot be restored)
  • rename phenotype to modifiers (mostly DnaPhenotype to DnaModifiers)
  • unflatten DnaModifiers in serde for structs AppRoleDnaManifest and CreateCloneCellPayload

TODO:

  • CHANGELOG(s) updated with appropriate info
  • Just before pressing the merge button, ensure new entries to CHANGELOG(s) are still under the UNRELEASED heading

Copy link
Member

@maackle maackle left a comment

Choose a reason for hiding this comment

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

Really nice, clean, straightforward, easy to read implementation!

crates/holochain/src/conductor/conductor.rs Show resolved Hide resolved
.conductor
.restore_clone_cell(&app_id, &clone_cell_id)
.await?;
self.create_and_add_initialized_cells_for_running_apps(self.clone(), Some(&app_id))
Copy link
Member

Choose a reason for hiding this comment

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

Ah I see you added the line I expected above, here. Yeah, I see why you did this, since it's weird to pass a ConductorHandle down into the Conductor. I think ideally the ConductorHandle shouldn't do anything that the Conductor can't do itself. However, the whole ConductorHandle/Conductor thing has become a mess that needs to be reworked so I'm ok with this.

Copy link
Contributor Author

@jost-s jost-s Sep 21, 2022

Choose a reason for hiding this comment

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

I completely agree

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abe-njama Please add this as a refactoring item for the post-beta phase.

crates/holochain/src/conductor/tests/cell_cloning.rs Outdated Show resolved Hide resolved
Copy link
Member

@maackle maackle left a comment

Choose a reason for hiding this comment

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

Nicely done

Co-authored-by: Michael Dougherty <maackle.d@gmail.com>
@jost-s jost-s enabled auto-merge (squash) September 23, 2022 21:38
@jost-s jost-s merged commit 2f916e7 into develop Sep 23, 2022
@jost-s jost-s deleted the feat/clone-cell-deletion branch September 23, 2022 21:56
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.

None yet

2 participants