canonical / data-platform-libs

A collection of charm libraries curated by the Data Platform Team
https://charmhub.io/data-platform-libs
Apache License 2.0
9 stars 9 forks source link

[DPE-2723] fetch_my_relation() data function #99

Closed juditnovak closed 9 months ago

juditnovak commented 10 months ago

Currently no interface access is provided to retrieve data for the relation's "owner" (i.e. "this app") side.

This proposal is to fill that gap

juditnovak commented 10 months ago

TODO : Increase LIBPATCH. (Actually it's already dont locally, but I didn't wanna ruin the green pipelines :-) )

juditnovak commented 10 months ago

@welpaolo Regarding integration tests:

kaboca@pegasus:~/repos/data-platform-libs$ grep -r fetch_relation tests/integration/ | grep -v data_interfaces | grep -v s3
kaboca@pegasus:~/repos/data-platform-libs$

Note that fetch_relation_data() has been there "forever"...

Personally I think that the unittests are actually pretty complete and conveniencing this time. Furthermore there are implicit tests as some of the internal worklfows of data_intefaces.py are actually using these functionalities. Typically by invoking the is_resource_created(), or is_postgresql_plugin_enabled() calls -- which are used in integration tests.

If we still prefer to have integration tests, I'm happy to add them, but for once I'd do it in a separate PR -- given that 3-4 important deliverables are now blocked missing the functionality provided by this PR here...

juditnovak commented 9 months ago

For the record: since none of the leader-only functionaliites are confirmed with integration tests, we should address this issue.

I've opened Jira ticket https://warthogs.atlassian.net/browse/DPE-2730 (assigned to myself) to address this issue that goes back to the past.