Skip to content

Conversation

@PeterSuna
Copy link
Contributor

No description provided.

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Models from mdsal migrated to ietf-artifacts repository.
Add dependency to ietf-artifacts and fix dependencies to related models.
See MDSAL-886.

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
@gemini-code-assist
Copy link

Summary of Changes

Hello @PeterSuna, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request marks a significant update, primarily driven by a major version increment to 23.0.0 across the project. A core aspect of these changes involves migrating from the older InstanceIdentifier and KeyedInstanceIdentifier APIs to the more modern DataObjectIdentifier for interacting with the data tree, enhancing consistency and leveraging newer API features. Additionally, it includes updates to dependent YANG module revisions and internal service configurations to align with the latest framework capabilities.

Highlights

  • Major Version Update: The project and its examples have been bumped to version 23.0.0, indicating a significant release.
  • API Migration to DataObjectIdentifier: Extensive refactoring across multiple Java files to replace the older InstanceIdentifier and KeyedInstanceIdentifier APIs with the new DataObjectIdentifier for data tree operations, enhancing consistency and leveraging newer API features.
  • YANG Module Revision Updates: The network-topology-rpcs.yang module has been updated to depend on newer revisions of netconf-node-topology and odl-netconf-device.
  • Data Tree Change Listener Enhancements: The TopologyDataTreeChangeListener now uses a more robust switch expression for handling different types of data object modifications (WithDataAfter, DataObjectDeleted), improving code clarity and type safety.
  • Notification Service Update: The internal notification service initialization in NetconfDeviceServicesImpl has been updated to use RouterDOMNotificationService.
  • Dependency GroupId Change: The groupId for the rfc8639 dependency has been updated in lighty-netconf-device/pom.xml.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily handles the version bump to 23.0.0, which involves updating pom.xml files and YANG model revision dates. A significant and positive change is the migration from the deprecated InstanceIdentifier to DataObjectIdentifier across the codebase. I've identified one area for improvement concerning non-atomic datastore operations and have provided a suggestion to enhance data consistency.

Comment on lines 546 to 551
final WriteTransaction writeTxConfig = this.dataBrokerService.newWriteOnlyTransaction();
final WriteTransaction writeTxOper = this.dataBrokerService.newWriteOnlyTransaction();
writeTxConfig.delete(LogicalDatastoreType.CONFIGURATION, instanceIdentifier);
writeTxOper.delete(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);
writeTxConfig.delete(LogicalDatastoreType.CONFIGURATION, identifier);
writeTxOper.delete(LogicalDatastoreType.OPERATIONAL, identifier);
writeTxConfig.commit().get(TimeoutUtil.TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
writeTxOper.commit().get(TimeoutUtil.TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);

Choose a reason for hiding this comment

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

high

Using two separate write transactions to delete from CONFIGURATION and OPERATIONAL datastores is not atomic. If the first commit succeeds and the second one fails, the datastores could be left in an inconsistent state. It is recommended to perform both delete operations within a single transaction to ensure atomicity.

Suggested change
final WriteTransaction writeTxConfig = this.dataBrokerService.newWriteOnlyTransaction();
final WriteTransaction writeTxOper = this.dataBrokerService.newWriteOnlyTransaction();
writeTxConfig.delete(LogicalDatastoreType.CONFIGURATION, instanceIdentifier);
writeTxOper.delete(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);
writeTxConfig.delete(LogicalDatastoreType.CONFIGURATION, identifier);
writeTxOper.delete(LogicalDatastoreType.OPERATIONAL, identifier);
writeTxConfig.commit().get(TimeoutUtil.TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
writeTxOper.commit().get(TimeoutUtil.TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
final WriteTransaction writeTx = this.dataBrokerService.newWriteOnlyTransaction();
writeTx.delete(LogicalDatastoreType.CONFIGURATION, identifier);
writeTx.delete(LogicalDatastoreType.OPERATIONAL, identifier);
writeTx.commit().get(TimeoutUtil.TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);

DOMNotificationRouter does not provide prepared
RouterDOMNotificationService.
See MDSAL-884.

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
InstanceIdentifier is replaced with DataObjectIdentifier and all
methods using InstanceIdentifier are being deprecated.
Switch to DataObjectIdentifier usage.
See MDSAL-817 and MDSAL-887

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Set new revsion for odl-netconf-device 2025-10-28.
See NETCONF-1502.

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Set new revsion for netconf-node-topology 2025-11-03.
See NETCONF-1502.

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
DataObjectModification was remodeled intorducing new way how to
handle onDataTreeChanged.
See MDSAL-889 and NETCONF-1530

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Modernize usage of YangInstanceIdentifier, replacing deprecated
methods.
See:
Ie6a431deaca0a80b8ce1d16dad5a1b919c94f722

JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
JIRA: LIGHTY-394
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
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.

1 participant