Plan Collaboration #349
Replies: 6 comments 4 replies
-
Since duplicating produces a completely new Do you think that's a concern? |
Beta Was this translation helpful? Give feedback.
-
Updates from our UX workflow meeting just now:
|
Beta Was this translation helpful? Give feedback.
-
I've updated the python prototype with a candidate implementation using "snapshots" - here is the implementation and here is the test suite. Still missing: the "staging plan" is not part of this prototype yet - nor is "locking" of the plan receiving changes. It's also missing test cases for modifications to the plan receiving changes after the merge request has been created, as well as to the plan receiving changes between the creation and beginning of the merge request. Another thought: since "pull" and "merge" are symmetric, it could be worth having the option to go through a lighter weight workflow if you just want to pull changes without running constraints on them. |
Beta Was this translation helpful? Give feedback.
-
We've sketched out the state machine related to merge requests. Blank circle represents a starting state, and a circle with a dot represents a terminating state. |
Beta Was this translation helpful? Give feedback.
-
Are we planning to use snapshots? You say "plan snapshots for simulation" is a non-goal, and I'm not sure what that means. |
Beta Was this translation helpful? Give feedback.
-
Plans will be merged following a three way merge algorithm. After beginning a merge, the activities will be placed into one of two areas: a Merge Staging Area (MSA) and a Conflicting Activities table (CA). Where they will go is decided as follows:
|
Beta Was this translation helpful? Give feedback.
-
@Mythicaeda and I have spent some time on our own trying to define what plan collaboration will look like in Aerie, and we'd like to open that discussion up to the community. Below, you'll find our working understanding of what duplicating and merging a plan may look like.
Plan Collaboration Specification
This specification lays out the semantics of plan collaboration. It
tries to focus on observable properties without overly constraining
the implementation. It describes the system behaving as if it were
implemented a certain way, but tries to leave room for alternative
representations and optimizations.
Importantly, this specification is focused on user workflows, and does not
take into consideration tradeoffs associated with implementation efficiency
or performance.
Primary Goals:
edits without seeing other people's edits
Secondary Goals:
Non-goals:
First off, we have the following entities:
to the same activity id.
time. This set may not contain two activity versions with the same
activity id.
at some point in time. The only operation it is required to support
is producing a changeset with a current version of a descendant
plan.
(referred to as the plan providing changes) into another, related plan
(referred to as the plan receiving changes). A merge request can be:
We define the following vocabulary, to be used in defining our operations.
We say that a plan comparison point is in the history of another plan
comparison point if the former was in the history of the plan when the
latter was created.
A compliant implementation must support the following operations:
create_fresh_plan()
A new plan can be created. This plan will have a fresh id, and contain no activities.
create_activity(plan_id, type, start_time, args)
An activity version can be added to a plan.
update_activity(plan_id, activity_id, start_time, args)
An activity version in a plan can be replaced with another activity version with the same activity id
delete_activity(plan_id, activity_id)
An activity can be removed from a plan.
duplicate_plan(plan_id)
Duplicating a plan creates a new plan, with a fresh id, that contains the same activity versions as the original plan. Duplicating a plan also creates a plan comparison point that will be in the history of both the child and the parent plan.
create_merge_request(plan providing changes, plan receiving changes)
Creating a merge request involves the following steps:
contents of the plan providing changes. In the event that this
merge request is committed, this plan comparison point will be in
the history of both plans going forward
- the id of the plan receiving changes
- the id of the plan providing changes
- the changeset of the plan providing changes
- an uninitialized set of conflicts
- an empty set of decisions
- a status: "in progress"
initiate_merge(plan_id_a, plan_id_b)
Merging plan B (plan providing changes) into plan A (plan receiving changes) follows the following steps:
resolve_conflict(merge request id, decision)
Resolving a conflict updates the given merge request with the decision made. It also updates the staging plan to reflect this decision.
abort_merge(merge request id)
Aborting a merge request marks that merge request as aborted, deletes the staging plan, and unlocks the plan receiving changes.
commit_merge(merge request id)
When a merge request is committed, the plan receiving changes is updated to contain:
- All activities that were unique to the plan receiving changes
- All non-conflicting changes from the plan providing changes
- All decisions from this merge request
The staging plan can be deleted, and the plan receiving changes can be unlocked.
delete_plan(plan_id) Deleting a plan does not delete its plan comparison points unless they can never be used in a future merge (see Garbage collecting section below)
Locking plans:
When there is an in-progress merge, no modifications are permitted
to either of the two plans involved in the merge. (Although it could
be possible to allow changes to the plan
being merged).
"Practice" merges:
It may be desirable to initiate a merge without locking both plans,
since that may be disruptive.
Garbage collecting plan comparison points:
The only requirement is to keep all plan comparison points that could
ever be used in a current or future merge. Duplicate and merge both
create new plan comparison points, which can shadow existing plan
comparison points. Deleting a plan can also reduce the set of plan
comparison points that can ever be used in a merge.
Temporal subset duplication:
Conceptually, you have duplicated the whole plan, but are limiting
your view/action to a subset.
A merge proceeds as though you have the whole plan. This means that
conflicts may be created outside of your view, and you will need to
resolve them. It should be possible to just bulk resolve all the
conflicts that are outside of your view to just keep the version in
the plan receiving changes. We can possibly make this choice
implicitly, and never show conflicts outside of your view
After a merge is committed, your filter will be reapplied to the full
set of activities - activities that have been moved out of your view
will no longer be visible, and activities that have been moved into
your view will be visible.
It should be possible to run a simulation containing only the
activities in your view.
Changing the start or end time of a plan
There are two possible semantics of changing the start time of the plan:
Option 1 would be a clean extension of our current duplicate/merge semantics. Option 2
would be considered a change of the start time of the plan followed by a modification
of every single activity.
Duplicating other entities affiliated with plans
This specification does not specify what happens to the scheduling
specification, constraints, and other entities that may be affiliated
with a plan when the plan is duplicated or merged.
Beta Was this translation helpful? Give feedback.
All reactions