Skip to content

Conversation

@rcourtier
Copy link
Member

@rcourtier rcourtier commented Jan 14, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?

No.

What kind of change does this PR introduce?

Bug fix + doc update.

What is the current behavior?

Generator's extension GeneratorEntsoeCategory with code = 0 is not allowed (min value is 1).

What is the new behavior (if this is a feature change)?

GeneratorEntsoeCategory extension has a new version (v1.1) that allows code = 0 (min value is 0).
Backward compatibililty is ensured, although when trying to serialize a code = 0 in the legacy version (v1.0), the extension is not written and a warning log is generated.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Other information:

Generators with code equal to 0 represent synchronous condenser.

MatthieuSAUR and others added 3 commits December 29, 2025 09:39
Signed-off-by: Matthieu SAUR <[email protected]>
… version 1.15 -> 1.16)

Co-authored-by: Olivier Perrin <[email protected]>
Signed-off-by: Matthieu SAUR <[email protected]>
@sonarqubecloud
Copy link

@rcourtier rcourtier requested review from olperr1 and rolnico January 14, 2026 11:44
Comment on lines +52 to +59
@Override
public boolean isValid(GeneratorEntsoeCategory entsoeCategory, SerializerContext context) {
if (entsoeCategory.getCode() == 0 && getExtensionVersionToExport(context) == Version.V_1_0) {
LOGGER.warn("Extension entsoeCategory not valid for Generator: {}. Reason: code = 0 not allowed in version 1.0.",
entsoeCategory.getExtendable().getId());
return false;
}
return true;
Copy link
Member

Choose a reason for hiding this comment

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

Instead of adding a new isValid method, you could override the existing isSerializable method.
See for example the override in MeasurementsSerDe:

    @Override
    public boolean isSerializable(Measurements<C> extension) {
        return !extension.getMeasurements().isEmpty();
    }

@github-project-automation github-project-automation bot moved this from In Progress to Waiting for review in Release 03/2026 Jan 19, 2026
Base automatically changed from bump_iidm_to_1_16 to main January 29, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Waiting for review

Development

Successfully merging this pull request may close these issues.

4 participants