-
Notifications
You must be signed in to change notification settings - Fork 6
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 partial variants #494
Open
antoinebhs
wants to merge
15
commits into
main
Choose a base branch
from
diff-variant
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
… into diff-variant Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Signed-off-by: Antoine Bouhours <antoine.bouhours@rte-france.com>
Quality Gate passedIssues Measures |
antoinebhs
requested review from
jonenst,
etiennehomer,
EtienneLt,
FranckLecuyer and
SlimaneAmar
January 2, 2025 14:43
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
This PR adds support for partial variant clone.
In the following, we'll use these terms:
Note: the concept of partial variant as it is implemented assumes (as before) that when a variant is modified, all the "child" variants are deleted and need to be rebuilt.
What is the current behavior?
When cloning a network, all the identifiables and external attributes (reactive capability curves, temporary limits, etc.) are cloned. It leads to long clone time and duplicates unnecessary data in the server.
What is the new behavior (if this is a feature change)?
We add support for partial clone to only save on the server created/updated identifiables or external attributes in partial variants. Most of the logic is implemented in the server.
In the network store, this is done by adding two new network attributes:
In order to change the cloneStrategy, one can:
Note: NetworkStoreService.setCloneStrategy() does a synchronous call to the server to update the network attributes. This is done to make sure that we read the correct clone strategy as cloneVariant are also synchronous.
By default, when creating a network or cloning a network, the clone strategy is always set to partial. This means that if you have N1 with clone strategy full and you full clone it to N2, the clone strategy of N2 will be partial. I did it that way because I consider that full clone are a one time operation and should not be persisted for the next variants. This logic is applied in the server and cached client/buffered client too.
We also added utility methods to bind and update attributes for SV updates (see corresponding code in the server). It simplified the code on the server but I'm not sure it's a good implementation to have this in the client as it does not make much sense. To be discussed.
Does this PR introduce a breaking change or deprecate an API?
Other information:
As we don't implement a way to have a full clone from a partial variant, all variants are partial except the initial variant (variantNum = 0). We can thus see this first implementation as a "diff from initial variant". See further work to see what's missing to have full variant in between partial variants.
Prerequisite for this PR:
Further work should be done to: