Robert Varga [Thu, 27 Mar 2025 10:54:02 +0000 (11:54 +0100)]
Remove suppression from NodeTypeStepWithPredicates
Current SpotBugs does not seem to report this issue anymore, remove the
suppression.
Change-Id: Ib370c70ea6d05dddf1a4ebceaa92d0faecb55025
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 10:25:14 +0000 (11:25 +0100)]
Eliminate SuppressFBWarnings from YangStmtMapping
We really do not want to expose the suppression annotation. This
achieves that goal by a simple removal of @NonNullByDefault.
Change-Id: I1324377b0cb09ac3265919978b9724465753bdbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 08:44:44 +0000 (09:44 +0100)]
Do not user checker Regex in yang-data-codec-gson
This is not useful, really. We also fix an non-optional import of
checker.
Change-Id: I21c6f70df3159820e391738e1b736a9bd602576c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 07:55:58 +0000 (08:55 +0100)]
Drop use of checker.regex.qual.Regex in rfc7950 parser
This annotation is not really useful, remove it. This also fixes
reliance on specific checker version.
Change-Id: Ic640102db125de515c1f847756c5ca677b50e7db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 07:49:24 +0000 (08:49 +0100)]
Drop use of checker.regex.qual.Regex in rfc6643 model
This annotation is not really useful, remove it.
Change-Id: Iea15fdba5a088d4120ef644231fd08e3b8481f32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 07:39:51 +0000 (08:39 +0100)]
Drop use of checker.regex.qual.Regex in binding-spec
This annotation is not really useful, remove it. This also fixes
reliance on specific checker version.
Change-Id: I263a4abe5ef196d0fb920b59ce058fbdf6fae734
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 07:31:22 +0000 (08:31 +0100)]
Remove unneeded surefire configuration
Our add-opens is not effective here, as it points to the wrong module.
Remove it, as it does not seem to impact anything.
Change-Id: Ic11f7c29fd7eb417418e3c7f9a88c42393b814d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 26 Mar 2025 22:10:45 +0000 (23:10 +0100)]
Drop use of RegEx in common/*
This annotation is not really useful, drop it.
Change-Id: I7909e4128f2bef6a8e54f948dab64bb346a3ad42
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Mar 2025 07:04:54 +0000 (08:04 +0100)]
Remove use of checker.qual in concepts
We are only using @NonNegative, drop that use and remove dependency on
checker annotations.
Change-Id: I6029cdd5d16644b6d6d3fed22f13bc62bf60f032
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 26 Mar 2025 13:26:19 +0000 (14:26 +0100)]
Clean up tests
We have warnings coming from tests being public. Hide them.
Change-Id: I3080c8cc3618d4a711814343defecb1d05d40102
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Mar 2025 20:09:09 +0000 (21:09 +0100)]
Fix odl-yangtools-xpath-api description
We are missing a critical declaration, add it.
Change-Id: I0740971627a295fadada3c0345da895e37986c39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 8 Mar 2025 01:41:13 +0000 (02:41 +0100)]
Bump versions to 14.0.12-SNAPSHOT
This starts the next development iteration.
Change-Id: If0c2c0431e231ab7e41b55961b401ffae4ecc677
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Fri, 7 Mar 2025 17:47:38 +0000 (17:47 +0000)]
Release yangtools
Robert Varga [Fri, 7 Mar 2025 16:48:25 +0000 (17:48 +0100)]
Convert binding-data-codec-spi to bnd-parent
Another simple conversion, and again we make checker-qual optional.
Change-Id: I895c14ea8e2e7b236b530cf6c55d5dc1aa11b168
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 16:27:57 +0000 (17:27 +0100)]
Convert yang-repo-spi to bnd-parent
This is another simple conversion. Also make checker-qual import
optional, as it is a purely-internal thing.
Change-Id: Ic4a47acbba6b675657885b99b5c8ff3003db6295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 16:07:34 +0000 (17:07 +0100)]
Convert yang-repo-api to bnd-parent
This is a trivial conversion.
Change-Id: Iab03936982dac8b95ce81a776e24e8a3b0042850
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 15:50:30 +0000 (16:50 +0100)]
Convert binding-runtime-spi to bnd-parent
Update packaging and improve documentation a bit.
Change-Id: Iec305d6f7a509079b0096a12c4cf95daf6f8bf47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 15:16:05 +0000 (16:16 +0100)]
Remove an unneeded suppression
SpotBugs is no longer flagging NP_NONNULL_RETURN_VIOLATION, remove the
suppression.
Change-Id: I412e271c70c2b8d533447faced91642921369293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 15:36:58 +0000 (16:36 +0100)]
Fix a typo
We have two spaces here, remove one of them.
Change-Id: I01e5bab80fe442c76ebaf14ee6b3c3304da6bce9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 13:13:33 +0000 (14:13 +0100)]
Bump byte-buddy to 1.17.2
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.0
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.1
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.2
Change-Id: I317c260fa6ddc778d2a881ed0dfdb1fadfeed425
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 12:06:01 +0000 (13:06 +0100)]
Bump odlparent to 14.0.8
Pick up the triemap downgrade from upstream.
Change-Id: I117fbc23af3c93db524ee9d0acc15af62ba1a2de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 12:41:12 +0000 (13:41 +0100)]
Switch codegen to target Java 21
We are targeting Java 17 here, let's switch to using Java 21.
Change-Id: I0a772c0f0eed8fce4ea6814c4828c063f5dfc572
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 12:06:45 +0000 (13:06 +0100)]
Bump xtend to 2.38.0
https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2025/02/26/version-2-38-0
Change-Id: Ic9e0e080769df016c8ef682ea5a5cd09c3e1130f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Mar 2025 12:00:08 +0000 (13:00 +0100)]
Revert "Bump versions to 15.0.0-SNAPSHOT"
This reverts commit
64f0cfb527cc54b25405dbcbae6b0c585889a157, as we need
to quickly spin a release.
Change-Id: I631079a486c48a27d8a5fe8a1c9e2a900345fc98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Feb 2025 08:42:53 +0000 (09:42 +0100)]
Bump versions to 15.0.0-SNAPSHOT
This starts the next major development iteration.
Change-Id: Iae9ca9118a8033f8c54b33487e2ebec282b8deda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Feb 2025 15:19:53 +0000 (16:19 +0100)]
Bump versions to 14.0.11-SNAPSHOT
This starts the next development iteration.
Change-Id: Ia6cde3f8da1187d693216c2df372b4f4dd5050ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Tue, 25 Feb 2025 13:00:08 +0000 (13:00 +0000)]
Release yangtools
Robert Varga [Fri, 14 Feb 2025 11:31:28 +0000 (12:31 +0100)]
Add DataObjectIdentifier.Builder.toReferenceBuilder()
We have a use case where we start off with a DataObjectIdentifier, but
want to create a wildcard reference to something underneath it.
The only way to achieve this is to bridge to InstanceIdentifier's
builder -- which is cumbersome and not straightforward.
This patch adds a method that makes it much easier: now we can switch to
lenient DataObjectReferenceBuilder with a simple method.
JIRA: YANGTOOLS-1661
Change-Id: I9932251e9faf80059fe043eaed491019c514a767
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Feb 2025 11:44:04 +0000 (12:44 +0100)]
Move YT1660Test
The test landed in the wrong package. Correct that. Since we are moving
things, also clean up the error message.
JIRA: YANGTOOLS-1660
Change-Id: Id32c81ddd07f0954987175d56ca60dd2290d63a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 14 Feb 2025 11:30:45 +0000 (12:30 +0100)]
Add DataObjectReference.{find,get}FirstKey()
Previous installation failed to provide the usual methods for user, this
patch fixes that up.
JIRA: YANGTOOLS-1660
Change-Id: Ic700e573342d64dda69115da81d92a3a84ed8fae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Feb 2025 10:22:18 +0000 (11:22 +0100)]
Do not import java.io.Serial
Just use a FQCN, which is simpler.
Change-Id: Id31cf5d92091137b34a95d87fc821f72ba3467f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Feb 2025 13:46:06 +0000 (14:46 +0100)]
Filter do not import javax.inject
A slight wrinkle here: we do not use javax.inject in OSGi, therefore we
should not be importing it.
JIRA: YANGTOOLS-1659
Change-Id: I737258623596196a12566fcd658c60c44a887d77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Feb 2025 22:02:27 +0000 (23:02 +0100)]
Resync yang-data-demo, part one
binding-test-model -> binding-codegen copy of the two yang-data
examples.
Change-Id: Iea96aaa4420e4f9273fcdf431e39891dbc0f2f9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Feb 2025 21:49:19 +0000 (22:49 +0100)]
Improve tooling interactions
Number of things:
- explicitly request Locale.ROOT + UTF-8
- disable annotation processing
- improve diag format
Change-Id: I3d628675831a3b5b89238b5096ed62b9479c3120
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Feb 2025 19:24:45 +0000 (20:24 +0100)]
Migrate binding-codegen test to NIO2
This also performs major clean ups:
- eliminate duplication in YangModuleInfoCompilationTest
- migrate callers of assertTrue()
Change-Id: I8b02dff19eede2a6db1db150708eb11842d78f47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Šimon Ukuš [Tue, 6 Jun 2023 08:00:46 +0000 (10:00 +0200)]
Test/Reproduce behavior described in MDSAL-713
A (possibly) faulty behavior was found during the work on MDSAL-713
described in the JIRA issue. The problem is in the inconsistency of
statement reporting as being introduced by augmentation.
While substatements of DeclaredCaseEffectiveStatement,
that was introduced by augmentation, are reported as being introduced
by augmentation, the substatements of UndeclaredCaseEffectiveStatemet,
which was introduced by augmentation, are NOT reported that way.
This change introduces a test that aims to reproduce such behavior.
JIRA: MDSAL-713
Change-Id: I97f7e5aad613c2ee11f60935af9d5db5f352fdea
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 8 Feb 2025 18:41:03 +0000 (19:41 +0100)]
Bump versions to 14.0.10-SNAPSHOT
This starts the next development iteration.
Change-Id: I9960dc995b389075751fd2b49645e56420c37c09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Sat, 8 Feb 2025 16:27:14 +0000 (16:27 +0000)]
Release yangtools
Robert Varga [Sat, 8 Feb 2025 14:34:51 +0000 (15:34 +0100)]
Bump odlparent to 14.0.7
Pick up the fix from upstream.
Change-Id: Ib64404d46d0a512e7611e71b1cbae28a2c0f068c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Anil Belur [Wed, 11 Dec 2024 03:05:47 +0000 (13:05 +1000)]
CI: Enable Gerrit Verify workflows with GHA
This is a pre-req to move Jenkins jobs to GHA.
Change-Id: I693df6145d278f12e75f70a11314854fd0ccf56b
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Anil Belur [Wed, 11 Dec 2024 03:05:16 +0000 (13:05 +1000)]
CI: Enable Github2Gerrit workflow
This allows Github devs/users to contribute to the repo using the
Github workflow.
Change-Id: Ibaf3b3dc7509b681b5e81e3dbcad91fa6bfae070
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Robert Varga [Fri, 7 Feb 2025 17:34:46 +0000 (18:34 +0100)]
Bump versions to 14.0.9-SNAPSHOT
This starts the next development iteration.
Change-Id: Ie2b411c6385f96716c87a5d376b8a8e6c67ed62e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Fri, 7 Feb 2025 16:09:51 +0000 (16:09 +0000)]
Release yangtools
Robert Varga [Fri, 7 Feb 2025 14:38:45 +0000 (15:38 +0100)]
Convert yang-parser-reactor to bnd-parent
This is another trivial conversion.
Change-Id: I954feabcf5dc57580de7b5d51b2396a14cf7aee1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 14:33:56 +0000 (15:33 +0100)]
Convert odlext-parser-support to bnd-parent
This is another trivial conversion.
Change-Id: I546c130085a7436045c4fc7fdae11729a0a56158
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 14:30:21 +0000 (15:30 +0100)]
Convert rfc8819-parser-support to bnd-parent
This is another trivial conversion.
Change-Id: Id4026e03fb55cf0e699209e8afd24d972a2b5e49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 14:18:53 +0000 (15:18 +0100)]
Convert rfc8639-parser-support to bnd-parent
This is another trivial conversion.
Change-Id: Ie99146d6bfa33a88cb2348d06d692a93a1a4ef92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 14:12:23 +0000 (15:12 +0100)]
Convert rfc8528-parser-support to bnd-parent
This is another trivial conversion.
Change-Id: I424345d226533c3762c2a5c584503e3fd396e348
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 14:06:11 +0000 (15:06 +0100)]
Convert rfc8040-parser-support to bnd-parent
This is another trivial conversion.
Change-Id: Iddb1e5a22addc5e0bca8c93ca0b81e9b020c72c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 14:09:06 +0000 (15:09 +0100)]
Fix export warnings in rfc6241-parser-support
We need to re-export org.opendaylight.yangtools.yang.parser.spi.
Change-Id: I2312dbc9923161efa7a2bf3e7037483bda8b9143
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 6 Jan 2025 12:54:02 +0000 (13:54 +0100)]
Bump odlparent to 14.0.6
Pick up latest upgrades from upstream.
Change-Id: I9da3d674e5717623ae34262cdc0da999fe9e480f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 10:52:54 +0000 (11:52 +0100)]
Migrate rfc7952-parser-support to bnd-parent
This is a trivial migration.
Change-Id: I5c3df0f087ab963e1512439011fec7958989c84d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 10:42:11 +0000 (11:42 +0100)]
Migrate rfc6643-parser-support to bnd-parent
This is a trivial migration.
Change-Id: I28ccbfce41840e32b060e0fdab02590fa7fbec96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 10:29:19 +0000 (11:29 +0100)]
Migrate rfc6536-parser-support to bnd-parent
This is a trivial migration.
Change-Id: I0c9d750b1860130d26c93b0e00840374fa30fef9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 08:47:46 +0000 (09:47 +0100)]
Convert rfc6241-parser-support to bnd-parent
This is another straightforward conversion.
Change-Id: Ia15d95930dc54f079d6b5bcdd29eae8108243132
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 7 Feb 2025 08:42:05 +0000 (09:42 +0100)]
Convert yang-parser-api to bnd-parent
Another simple conversion.
Change-Id: Ibcb829fd1836c1e565ff57b4aa4dc3c0f6945b12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Thu, 6 Feb 2025 13:33:17 +0000 (14:33 +0100)]
Add DataObjectReference.firstKeyOf()
InstanceIdentifier class has been mark as deprecated since 14.0.0.
A .toLegacy() method has been introduced to
DataObjectReference class in order to ease the transition.
There is a glaring omission, which is forcing downstream users to bounce
DataObjectReferences through .toLegacy(): firstKeyOf().
Introduce DataObjectReference.firstKeyOf() as the generalization of
InstanceIdentifier.firstKeyOf(), with the implementation residing in
AbstractDataObjectReference.
While we are at it, we improve the documentation a bit and improve
argument checks, so as not to get defeated by raw type overrides.
JIRA: YANGTOOLS-1656
Change-Id: Ibea2e8eec664927f652f963fda2ce06d738941c4
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 16:44:34 +0000 (17:44 +0100)]
Convert yang-data-util to bnd-parent
The first part of this is obvious -- change pom.xml, update
module-info.java, add package-info.java's to hold @Export.
The second part is less obvious: since we now explicitly control
exports, we can from 'impl' from 'impl.context'. This is a safe
operation, as we do not expose this package in JPMS nor in OSGi.
Change-Id: Iaea72ca0db8dc9deae2538e109e5b6668dcbe4b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 19:50:31 +0000 (20:50 +0100)]
Convert binding-runtime-api to bnd-parent
Add a documentation and explicit export anchor, using more modern OSGi
integration.
Change-Id: I3ed50609856d074f0b74a5997dea03ef100d5bc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 19:22:33 +0000 (20:22 +0100)]
Convert yang-data-codec-gson to bnd-parent
Improve the manifest and documentation a bit.
Change-Id: Ia8585c9d9fdc415737023763260df1aee4e6398f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 18:52:05 +0000 (19:52 +0100)]
Convert yang-data-codec-xml to bnd-parent
Improve the manifest and documentation a bit.
Change-Id: I9bf212f7ef06ba8335d5f01bb7fd463539b6baeb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 18:22:36 +0000 (19:22 +0100)]
Convert yang-data-codec-binfmt to bnd-parent
This is a trivial conversion, with the added twist of fixing up all
javadocs and enabling enforcement.
Change-Id: Ia2476a2bcf80402896a08ae965cb28b45f1474c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 18:21:25 +0000 (19:21 +0100)]
Improve FIXME
Add the literal XML fragment to enable linting.
Change-Id: Ic7f4d26250daa3e28dfe9c7a0bced537e9f48544
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 13:33:41 +0000 (14:33 +0100)]
Migrate yang-data-tree-api to bnd-parent
This is mostly a trivial conversion, improving documentation very
slightly.
Change-Id: I59549275865c8669cbf3af46834ecac653c13a0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 13:27:10 +0000 (14:27 +0100)]
Use correct annotation in data.tree.api.DataTree
We are using SpotBugs @Nullable here by mistake. Switch to using JDT
version.
Change-Id: I9ece015097920684445a0b08429a86c52c329806
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 13:24:40 +0000 (14:24 +0100)]
Migrate yang-data-spi to bnd-parent
This is a simple migration.
Change-Id: If08f6d956c845924ba145199d428f342aeaa1769
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 13:22:47 +0000 (14:22 +0100)]
Update yang-data-api description
We are using just the artifactId, this patch adds a bit more descriptive
description.
Change-Id: I258ea9b3014d5a7271791720813cf4b4d147f93a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 12:46:01 +0000 (13:46 +0100)]
Modernize yang-parser-rfc7950 a bit
Use AssertJ instead of the more obvious uses of Hamcrest.
Change-Id: I7ad281229f71132a60dc64b2f59c7cc5db502987
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 12:19:04 +0000 (13:19 +0100)]
Modernize yang-data-codec-xml tests
Use AssertJ instead of Hamcrest for most tests.
Change-Id: Idf87b126dce062f31c743d705119c5df5c52a9c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 11:05:35 +0000 (12:05 +0100)]
Migrate binding-generator to JUnit5
This is the last holdout of JUnit4, migrate it.
Change-Id: Ib63ecc67c6d38d384552b10fb4948420533f3b86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 07:27:12 +0000 (08:27 +0100)]
Ditch Hamcrest from binding-data-codec-dynamic
Use AssertJ for the three assertions we are making here.
Change-Id: I81caa38d384efdbe5a717da4936c948acaa4bc40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 07:49:56 +0000 (08:49 +0100)]
Mass migrate to AssertJ
This performs a mass migration of most components from Hamcrest to
AssertJ.
Change-Id: I8f703ea9ed2190d2168255921c35370678d3d6d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 07:19:45 +0000 (08:19 +0100)]
Migrate to JUnit5 assertions
We have a few straggling places where we are still using JUnit4
assertions. Migrate all those places.
Change-Id: I3586f5d9b8b5dc5a5f294ab448bb1375be8cc550
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 08:13:05 +0000 (09:13 +0100)]
Convert binding-data-codec-api to bnd-parent
This is a straightforward conversion, improving the manifest and
eliminating warnings.
Change-Id: I35ed4fd5c4556d764866ff6325b1c097b07e4031
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 07:33:27 +0000 (08:33 +0100)]
Do not use Hamcrest in yang-data-codec-gson
Use AssertJ instead.
Change-Id: I3f78e1b71d0b0ce68116f6fb3e7b56fbccd957b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Feb 2025 07:26:50 +0000 (08:26 +0100)]
Correct a FIXME
The target package name should be codec.dynamic.ri, fix that.
Change-Id: Ia762c67ca85fb5c3f2f5119a33b3177241518630
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 5 Feb 2025 18:05:20 +0000 (19:05 +0100)]
Migrate binding-data-codec-dynamic to bnd-parent
Take ownership of our exports, marking their evolution now that they are
not tied to Felix export-unless-impl treatment.
Change-Id: Ic37742c0cabbcc815f92be300512d1390b915964
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 5 Feb 2025 16:27:22 +0000 (17:27 +0100)]
Migrate binding-data-codec-dynamic to JUnit5
This is a mass migration. Tests are updated to use assertInstanceOf()
and other JUnit5/Java goodies we have picked up since they were written.
Change-Id: Icc9886a0f31f3b359a29cb9232938babce92e0e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 20 Jan 2025 15:48:22 +0000 (16:48 +0100)]
Bump versions to 14.0.8-SNAPSHOT
This starts the next development iteration.
Change-Id: I73827230ee6144906c0382f0c2794faf30302389
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Mon, 20 Jan 2025 12:48:18 +0000 (12:48 +0000)]
Release yangtools
Robert Varga [Mon, 20 Jan 2025 11:41:24 +0000 (12:41 +0100)]
Bump byte-buddy to 1.16.1
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.16.0
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.16.1
Change-Id: Ia2355c3dba486f4c5a01021a89129c00dda7fc22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 16 Jan 2025 10:46:12 +0000 (11:46 +0100)]
Improve locking in InMemoryDataTreeModification
Not all state transitions in InMemoryDataTreeModification require locking,
as read threads does not touch ModifiedNode once we move out of Ready.
This means synchronization is needed only for Ready -> AppliedSnapshot
and Ready -> Prepared transitions. After that we can access the
modification without any locking.
Write threads are required to coordinate between themselves, and
therefore AppliedSnapshot -> Prepared and any subsequent
validate/prepare transitions do not need locks as well.
JIRA: YANGTOOLS-1651
Change-Id: Ida55be0deeba69e18d9b52ad0c8a7eb6a32f7af0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 17 Jan 2025 10:30:44 +0000 (11:30 +0100)]
Expand YT1655Test
Show that versions are retained for untouched modifications.
JIRA: YANGTOOLS-1655
Change-Id: I97316698c3fa51eb3418019db631e7d4fce22a15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 17 Jan 2025 10:16:42 +0000 (11:16 +0100)]
Improve InMemoryDataTreeModificationTest
We have a few gaps in test coverage which can be addressed without doing
inter-thread heroics. This patch addresses them.
Change-Id: Ifde6c7778ff422d75a941efe43c747a08adde709
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 9 Jan 2025 08:44:31 +0000 (09:44 +0100)]
Add MemoryDataTreeModification.Prepared
When a modification completes prepare(), it is effectively cast in
stone, unless prepared again, hence we should treat it that way from
newModification().
This ensures that once prepare() completes, all calls to
newModification() will not touch the ModifiedNode tree.
JIRA: YANGTOOLS-1651
Change-Id: I9e1a41ac8bc7f65894b04f8e3e46006e9e023320
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 16 Jan 2025 11:04:02 +0000 (12:04 +0100)]
Enable applyToSnapshot() in Defunct state
Downstreams are catching exceptions thrown by ready() and recovering via
applyToCursor(). Fix that functionality by retaining the tree.
JIRA: YANGTOOLS-1651
Change-Id: Icbdc90058af1da4c2053d2af87dcc3b85f62aa26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 15 Jan 2025 20:12:47 +0000 (21:12 +0100)]
Improve Bug4295Test assertions
We are missing out on free test coverage that comes with minor
investment.
Provide expected child count for subtrees, exercising
ModifiedNode.modifiedChildre().size().
Also assert 'o' and 'o-id' leaf values via
ModifiedNode.modifiedChild(), improving coverage thereof.
JIRA: YANGTOOLS-1651
Change-Id: I8f4d3dc3549e2054f876f7efa99a0ff28e2f4994
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 9 Jan 2025 08:38:46 +0000 (09:38 +0100)]
Log InMemoryDataTreeModification transitions
InMemoryDataTreeModification performs a number of operations either
concurrently or locked. Log these transitions at TRACE level.
JIRA: YANGTOOLS-1651
Change-Id: Idbe4f97467c970a2c737cd7587da589fc2c720c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 9 Jan 2025 02:56:52 +0000 (03:56 +0100)]
Introduce InMemoryDataTreeModification.AppliedToSnapshot
Once we complete ready(), the user side of DataTreeModification is free
to invoke applyToCursor() and newModification() methods.
Introduce AppliedToSnapshot, which we enter into when we first observe
Ready state in newModification(). Any subsequent calls to
newModification() will just pick up snapshot root from AppliedToSnapshot
without touching ModifiedNode -- and thus we do not need any further
locking.
For the applyToCursor() path we may be racing with validate()/prepare(),
so perform that operation with the exclusive lock.
This brings more clarity as to what ModifiedNode.children is now and how
it should behave in the future -- which we thoroughly outline in FIXMEs.
JIRA: YANGTOOLS-1651
Change-Id: Icfb55beba97d9432e444df87631a03975bebb8e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 15 Jan 2025 11:07:36 +0000 (12:07 +0100)]
Guard empty children
Switch backing implementations when we encountere an empty child map,
making empty HashMaps more readily reclaimable.
This improves our ability to spot state errors, such as we just solved,
at least for obvious situations.
JIRA: YANGTOOLS-1651
Change-Id: I500b8e8758c7499af777773409ec16615da4294a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 27 Dec 2024 18:37:08 +0000 (19:37 +0100)]
Do not tolerate non-ModifiedNodes
ModifiedNode is sealed with only a single permitted subclass. Remove the
warning and run a plain verification instead. This will pop up if we
decide to extend the class hierarchy in the future.
Change-Id: Ida5e72ea5e36fc5f0dbeff7e97db569b87228de3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 Jan 2025 22:17:05 +0000 (23:17 +0100)]
Introduce InMemoryDataTreeModification.Defunct
We use 'Sealing' as a transitional state indicating not-Open, but do not
update it if something bad happens -- leaving no evidence of the
failure for future reference.
Introduce a Defunct state, which carries the evidence of the failure
along with the name of the thread that incurred it.
Since this is the second singleton State object, introduce
SingletonState to hold the common bits.
JIRA: YANGTOOLS-1651
Change-Id: Icdda877c576611ed86391cfe149c5cc385061830
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jan 2025 20:28:47 +0000 (21:28 +0100)]
Unify state transition error reporting
We have Illegal{Argument,State}Exception reported inconsistently when
we detect unhandled State.
This patch introduces illegalState() utility method, which unifies the
message reported and optionally propagates Defuct.cause.
JIRA: YANGTOOLS-1651
Change-Id: Idbc4dcb6fc3619596b11ec9989dea032d620d3dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jan 2025 18:31:53 +0000 (19:31 +0100)]
Introduce InMemoryDataTreeModification.Noop
The set of operations in a modification is defined as set when user
calls DataTreeModification.ready() and therefore we can check for
LogicalOperation.NONE before we complete the Open -> Ready transition.
This allows us to split out a singleton Noop state to represent a empty
modification and recognize it in newModification()/validate()/prepare()
so these run completely concurrently.
Since this is the second singleton State object, introduce
abstract SingletonState with a common toString().
JIRA: YANGTOOLS-1651
Change-Id: Ieb2700aa3673a5d305f618aae4cf8249e05d4133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 Jan 2025 19:01:22 +0000 (20:01 +0100)]
Do not modify sealed ModifiedNode.children
ModifiedNode.children track child logical operations, forming a tree of
operations for a particular DataTreeModification.
These were originally designed to be unmodifiable after seal(), so
that they can be traversed without taking any locks -- i.e. a ready
DataTreeModification can examine these without further concerns, for
example to replicate itself into a DataTreeModificationCursor.
This design was unfortunately broken during YANGTOOLS-501 development,
where we moved MERGE node expansion from ready() to prepare()-time by
having AbstractNodeContainerModificationStrategy issue modifyNode().
The nodes created in this expansion are only needed for
DataTreeCandidate's view of what changed.
This patch opts to store these children in a separate field, just as we
do for ModificationType, validated snapshots, etc., restoring
immutability of ModifiedNode.children.
This means we can run DataTreeModification.applyToCursor() without
holding any locks whatsoever -- which we express by having the utility
methods involved there operate on NodeModification only.
JIRA: YANGTOOLS-1651
Change-Id: Ic89f262d8bf3b7cab5a7dd958d586804538c4bfb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 14 Jan 2025 14:06:05 +0000 (15:06 +0100)]
Unify read{Node,VersionInfo) code
We have copy&paste of the same setup code. Introduce a resolveSnapshot()
method, which unifies the lookup.
JIRA: YANGTOOLS-1651
Change-Id: Ibf2138a9fe006e9fc368a4b0ebf35a983fe989cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 13 Jan 2025 22:31:35 +0000 (23:31 +0100)]
Refactor Bug4295Test
We have a test covering the various merge scenarios, but it lacks
reasonable assertions. This refactors the test and adds a number of
assertions.
JIRA: YANGTOOLS-1651
Change-Id: If2b2f6273c379700bec43fa33b843a54342c7101
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 28 Dec 2024 12:16:59 +0000 (13:16 +0100)]
Introduce InMemoryDataTreeModification.State
InMemoryDataTreeModification is a nexus of multiple code paths, each
accessing differing aspects of a ModifiedNode.
This patch encapsulates rootNode in a State object, so that a state
check is required before we act on the rootNode.
We initially have only the states mirroring the
STATE_{OPEN,SEALING,SEALED} constants, but more states are expected to
be introduced by follow-up patches.
toString() method is adjusted to dump state, but states no longer dump
the entirety of the ModifiedNode, to prevent OOMs when toString() is
called on large modifications as part of logging/error reporting.
Add InMemoryDataTreeModificationTest to test state transitions and their
expectations.
JIRA: YANGTOOLS-1651
Change-Id: I30a83b1944a3e27f56b243e6c64d4f8fa1b08d25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 13 Jan 2025 09:37:36 +0000 (10:37 +0100)]
Split AbstractMutableContainerNode.seal()
We have three possibilities here, sharing the same tail code. Split the
implementation out to aid inlining.
Change-Id: I74232b84c8bb363bfbc1de9b2bfb5ccda52c15f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 12 Jan 2025 20:12:17 +0000 (21:12 +0100)]
Rename getChildFromData()
Drop the 'get' prefix because we can return a null, which does not sit
well with our 'foo/getFoo/findFoo' patterns.
JIRA: YANGTOOLS-2399
Change-Id: Iabc2a51ff5baf19a901e8b20504c8c7cbfea5d26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>