Skip to content

Upgrade to OpenADR 3.1#313

Merged
pohlm01 merged 55 commits into
mainfrom
openadr3_1
Mar 13, 2026
Merged

Upgrade to OpenADR 3.1#313
pohlm01 merged 55 commits into
mainfrom
openadr3_1

Conversation

@pohlm01

@pohlm01 pohlm01 commented Nov 12, 2025

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Nov 12, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.54333% with 198 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.57%. Comparing base (92f4ba1) to head (7435c22).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
openleadr-vtn/src/jwt.rs 45.00% 55 Missing ⚠️
openleadr-vtn/src/lib.rs 55.22% 30 Missing ⚠️
openleadr-client/src/ven.rs 65.51% 20 Missing ⚠️
openleadr-vtn/src/api/program.rs 85.71% 11 Missing ⚠️
openleadr-client/src/lib.rs 75.00% 8 Missing ⚠️
openleadr-client/src/mdns.rs 76.47% 8 Missing ⚠️
openleadr-vtn/src/api/report.rs 22.22% 7 Missing ⚠️
openleadr-vtn/src/state.rs 80.00% 7 Missing ⚠️
openleadr-vtn/src/data_source/postgres/event.rs 95.23% 6 Missing ⚠️
openleadr-vtn/src/main.rs 0.00% 6 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #313      +/-   ##
==========================================
- Coverage   80.88%   80.57%   -0.31%     
==========================================
  Files          42       45       +3     
  Lines        4870     5242     +372     
==========================================
+ Hits         3939     4224     +285     
- Misses        931     1018      +87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pohlm01 pohlm01 linked an issue Nov 12, 2025 that may be closed by this pull request
bjorn3 and others added 24 commits January 27, 2026 11:50
In OpenADR 3.1 target filters are no longer typed. The set of target
labels for a stored entity is represented as a list of strings. And for
filtering you now use just a bunch of targets= query parameters.

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Björn Baron <bjorn@tweedegolf.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Björn Baron <bjorn@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Björn Baron <bjorn@tweedegolf.com>
Signed-off-by: Björn Baron <bjorn@tweedegolf.com>
Signed-off-by: Björn Baron <bjorn@tweedegolf.com>
The test cases that are still failing are related to the new "object
privacy" introduced by OpenADR 3.1 and will be corrected in a future
commit.

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Additionally, forbid setting the `venID` in `VenResourceRequest`.

See also the corresponding issues in the spec repo:
- oadr3-org/specification#380
- oadr3-org/specification#379

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
pohlm01 and others added 3 commits March 9, 2026 21:09
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
* Run cargo sqlx prepare

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Misc tweaks to the subscription wire definitions

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Support subscription crud api

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Add test for empty objectOperations in Subscription

Signed-off-by: Stefan van Ieperen <stefan@tweedegolf.com>
Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Add clientName query param

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Support filtering subscriptions by target object type

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Support filtering subscriptions by program id

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Add MockSubscriptionSource to fix MockDataSource

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Review comments

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

* Add a test for an unspecified edge case

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>

---------

Signed-off-by: Björn Baron <bjorn@tweedegolf.com>
Signed-off-by: Stefan van Ieperen <stefan@tweedegolf.com>
Co-authored-by: Stefan van Ieperen <stefan@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
@TeaDrinkingProgrammer

TeaDrinkingProgrammer commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

All tests on OpenADR3-client pass now (tested on commit ca27a00), so we will merge when you have merged and released a stable version on this side. Thanks for all the hard work!

ElaadNL/openadr3-client#53

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>

# Conflicts:
#	.github/workflows/checks.yml
#	Cargo.lock
#	Cargo.toml
@pohlm01

pohlm01 commented Mar 10, 2026

Copy link
Copy Markdown
Member Author

@TeaDrinkingProgrammer I'm happy to hear we are passing your tests. Unfortunately, there is still a significant security loophole in the specification, see https://github.com/oadr3-org/specification/discussions/371#discussioncomment-16068667.

I don't feel comfortable releasing a stable version of OpenLEADR quite yet, given that any possible fix is still a todo for us. Right now, any client can send a BlVenRequest or BlResourceRequest, no matter if it's a BL or VEN. That way, a VEN can circumvent any limits set by object privacy. (actually, I find it interesting that this is not tested by the OpenADR test suite....).

I suggest that I create another pre-release, and you continue working with that until this is addressed by the OpenADR Alliance in the specification. What do you think?

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
@TeaDrinkingProgrammer

Copy link
Copy Markdown
Contributor

Another pre-release works for us, I think we will release the client already since it works on our side, but I agree this issue needs to be resolved before a stable release.

@TeaDrinkingProgrammer

Copy link
Copy Markdown
Contributor

(also, don't forget to keep an eye on the DCO checks, happens to me all the time as well)

pohlm01 and others added 3 commits March 12, 2026 09:41
* WIP

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>

* Separate WriteVen scope for BL and Ven

Signed-off-by: Stefan van Ieperen <stefan@tweedegolf.com>

* Additional tests

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>

---------

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Stefan van Ieperen <stefan@tweedegolf.com>
Co-authored-by: Stefan van Ieperen <stefan@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
This reverts commit eee4535

Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
@pohlm01

pohlm01 commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

@TeaDrinkingProgrammer, What is your opinion about #388? In short, we split the write_vens scope into write_vens_ven and write_vens_bl while keeping an alias of write_vens to write_vens_ven. See also in the Readme.
That way, we can make a distinction between BL clients and VEN clients for /ven and /resource requests. If you agree, I'm going to merge this branch (without subscriptions) into main and release the first stable 3.1 version.

@pohlm01 pohlm01 force-pushed the openadr3_1 branch 8 times, most recently from 6bb067f to 54d4b57 Compare March 13, 2026 08:39
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
Signed-off-by: Maximilian Pohl <maximilian@tweedegolf.com>
@pohlm01 pohlm01 enabled auto-merge March 13, 2026 13:17
@pohlm01 pohlm01 added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 547144c Mar 13, 2026
20 checks passed
@pohlm01 pohlm01 deleted the openadr3_1 branch March 13, 2026 13:29
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.

Update to OpenADR 3.1

5 participants