Skip to content

initial commit#1

Closed
sinapah wants to merge 69 commits intomainfrom
feat/otlp-lib
Closed

initial commit#1
sinapah wants to merge 69 commits intomainfrom
feat/otlp-lib

Conversation

@sinapah
Copy link
Copy Markdown
Owner

@sinapah sinapah commented Feb 18, 2026

Initial dry run impl' for moving the otlp lib to charmlibs.
Based on: canonical/opentelemetry-collector-k8s-operator#131
Note: the integration and functional tests can be removed.
The unit tests that are brought over are those that are lib specific and not charm specific. These include the unit tests in the PR above that end in _lib.

@MichaelThamm
Copy link
Copy Markdown
Collaborator

It would be great if we can avoid patching cos-tool in charmlibs and instead install cos-tool from source prior to running unit tests. You may discover that the charmlibs infra does not support something like this yet, but please reach out to charm tec if this is something they want to support. E.g. this ref in otelcol-k8s

MichaelThamm and others added 28 commits March 10, 2026 19:30
* fix: make RulesModel fields optional and fix unit tests

* fix: move comment

* move comments
* feat: change log for 0.1.0

* fix: suggestions
* fix: favour modern protocols docs

* remove readme line
I've noticed that a couple of new interface libraries have started out
with `just init` instead of `just interface init`. I'm guessing this is
because they're following the tutorial, which assumes the a
non-interface library.

This PR adds a tip box the instruction to run `just init` to say you
should use `just interface init` for interface libraries, and adds some
advice for integration tests for interface libraries. It also adds a
couple of tips around unit and functional tests to contextualise the
tutorial's steps for real libraries.

**[[Preview
build]](https://canonical-ubuntu-documentation-library--343.com.readthedocs.build/charmlibs/tutorial/)**
The goal is introduce the APP_AND_UNIT mode that allows the requirer
charm to ask for unit and app certificates on the same integration:
- Use the same PK for both app and unit if it is passed in the init with
the APP_UNIT_MODE
- The csrs are mapped to app and unit when passed in APP_UNIT_MODE
- We don't allow a csr to be present in both app and unit in that case
we raise an error
- We place APP csrs into app relation databag and Unit ones to unit
relation databag
- No breaking changes
- Some public functions have additive mode param and will need to
provide that param when using APP_AND_UNIT and won't work without it,
ones that can take a param, because for example it is a property, can't
be used with this mode
This PR fixes the docs build failure that was recently introduced on
`main` via canonical#333.

As a driveby, I've also fixed the incorrectly formatted link in the
`tls-certificates` package docstring (added by me originally), and added
new Python fields to exclude from the docs (we don't exclude all magic
methods because `pathops` classes document some of them, but perhaps we
should revisit this decision in future).

**[[Preview
build]](https://canonical-ubuntu-documentation-library--349.com.readthedocs.build/charmlibs/reference/charmlibs/interfaces/tls-certificates/)**
…nonical#348)

A docs build failure was recently introduced on `main` via canonical#333. To
prevent this happening again in future, this PR adds a new check to
`ci.yaml` which builds the docs locally.
This PR updates the contributing docs to explain that we use
conventional commits for PR titles, and the scope should indicate the
library being worked on.

---------

Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
…canonical#351)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@sinapah sinapah closed this Mar 17, 2026
@MichaelThamm MichaelThamm deleted the feat/otlp-lib branch March 19, 2026 19:41
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.

5 participants