No project description provided
Project description
PIP Package for a variety of Data Platform Helpers
Table of Contents:
- Version Checker
1. Version Checker
Purpose:
used to determine if a relevant version attribute across related applications are valid.
There are many potential applications for this. Here are a few examples:
- in a sharded cluster where is is important that the shards and cluster manager have the same components.
- kafka connect and kafka broker apps working together and needing to have the same ubnderlying version.
How to use:
-
add to requirements in
requirements.txt:data-platform-helpers==0.1.1 -
in
src/charm.pyof requirer + providerin constructor [REQUIRED]:
from data_platform_helpers.version_check import CrossAppVersionChecker ... self.version_checker = self.CrossAppVersionChecker( self, version=x, # can be a revision of a charm, version of a snap, version of a workload, etc relations_to_check=[x,y,z], # only use if the version doesn't not need to exactly match our current version version_validity_range={"x": "<a,>b"})in update status hook [OPTIONAL]:
if not self.version_checker.are_related_apps_valid(): logger.debug( "Warning relational version check failed, these relations have mismatched versions", "%s", self.version_checker(self.version_checker.get_invalid_versions()) ) # do something, ie set status, instruct user to change something, etc -
other areas of the charm (i.e. joined events, action events, etc) [OPTIONAL]:
if not self.charm.version_checker.are_related_apps_valid(): # do something - i.e. fail event or log message -
in upgrade handler of requirer + provider [REQUIRED]:
if [last unit to upgrade]: self.charm.version.set_version_across_all_relations()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file data_platform_helpers-0.1.7.tar.gz.
File metadata
- Download URL: data_platform_helpers-0.1.7.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04445f3f4309730bb1c569a04464caeb27390b0d6e07829d09dacd8882fcfcd1
|
|
| MD5 |
c530476e04557ccf00244d09c2c2666b
|
|
| BLAKE2b-256 |
c90aaa8e38a444339d221ec3e29bbbacfeb88b869f5812578188c468f5af54a8
|
Provenance
The following attestation bundles were made for data_platform_helpers-0.1.7.tar.gz:
Publisher:
release.yaml on canonical/data-platform-helpers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_platform_helpers-0.1.7.tar.gz -
Subject digest:
04445f3f4309730bb1c569a04464caeb27390b0d6e07829d09dacd8882fcfcd1 - Sigstore transparency entry: 336199334
- Sigstore integration time:
-
Permalink:
canonical/data-platform-helpers@e224d04d67480b8c33336d3f82c5cc4f374dbced -
Branch / Tag:
refs/heads/main - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e224d04d67480b8c33336d3f82c5cc4f374dbced -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file data_platform_helpers-0.1.7-py3-none-any.whl.
File metadata
- Download URL: data_platform_helpers-0.1.7-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf01caef414a4c07911ecf2c009c19b8f69cae154b540dd578ddbe2af8fd3b98
|
|
| MD5 |
214e8fb8b6c3fb83952a10daeb1234fa
|
|
| BLAKE2b-256 |
a7ac57904c4bcc393ece5735ffbef71bd62dae7d213eeee49f81609af6b84d4c
|
Provenance
The following attestation bundles were made for data_platform_helpers-0.1.7-py3-none-any.whl:
Publisher:
release.yaml on canonical/data-platform-helpers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_platform_helpers-0.1.7-py3-none-any.whl -
Subject digest:
cf01caef414a4c07911ecf2c009c19b8f69cae154b540dd578ddbe2af8fd3b98 - Sigstore transparency entry: 336199358
- Sigstore integration time:
-
Permalink:
canonical/data-platform-helpers@e224d04d67480b8c33336d3f82c5cc4f374dbced -
Branch / Tag:
refs/heads/main - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e224d04d67480b8c33336d3f82c5cc4f374dbced -
Trigger Event:
workflow_dispatch
-
Statement type: