You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless we set limit: 1, charms should expect handling multiple relations. As a result, we always iterate over all relations' data to push/pull data.
I wonder if adding some primitives to ops would help with pitfalls and improve code quality. Because it's more straightforward to reason about a single databag.
I think in general we're reluctant to add multiple ways of doing things, but I can see how some of the code is more readable.
For now:
@james-garner-canonical is spending a lot of the current cycle looking at what libs Charm-Tech can create/maintain to make charming better. We've talked about some of that potentially being experimentation with new patterns that might then later make it into ops, so this could be a candidate for that.
I'm working on a spec (currently working on getting it from braindump to draft) to support typing and validating relation data. We're potentially going to need a new interface for that anyway, so while I'm working on it, I'll see if an approach like this would also fit in for that.
When the next planning period is coming around, we'll look through all the tickets, including this one, and see what's progressed and what we might want to work on for 25.10.
Unless we set
limit: 1
, charms should expect handling multiple relations. As a result, we always iterate over all relations' data to push/pull data.I wonder if adding some primitives to ops would help with pitfalls and improve code quality. Because it's more straightforward to reason about a single databag.
Update remote unit data
If ops had a function,
Then instead of:
we could have:
Update remote app data
If ops had a function,
then instead of
we could have:
Fetch remote unit data
If ops had a function,
then instead of
we could have:
The text was updated successfully, but these errors were encountered: