Skip to content

Commit

Permalink
Fix label treatment of related charms (#63)
Browse files Browse the repository at this point in the history
* Use fqdn instead of topology for instance label
* Add cos-tool to charm
* fetch-lib
  • Loading branch information
sed-i authored Mar 1, 2024
1 parent 7f3cfb0 commit 10868a4
Show file tree
Hide file tree
Showing 12 changed files with 744 additions and 190 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ body:
attributes:
value: >
Thanks for taking the time to fill out this bug report! Before submitting your issue, please make
sure you are using the latest version of the charm. If not, please switch to this image prior to
sure you are using the latest version of the charm. If not, please try upgrading to the latest edge release prior to
posting your report to make sure it's not already solved.
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: >
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to
If applicable, add screenshots to
help explain the problem you are facing.
validations:
required: true
Expand All @@ -22,7 +22,8 @@ body:
attributes:
label: To Reproduce
description: >
Please provide a step-by-step instruction of how to reproduce the behavior.
Please provide the output of `juju export-bundle` and step-by-step instructions for how to reproduce the behavior.
A deployment diagram could be handy too. See https://discourse.charmhub.io/t/9269 for examples.
placeholder: |
1. `juju deploy ...`
2. `juju relate ...`
Expand Down Expand Up @@ -55,4 +56,3 @@ body:
id: additional-context
attributes:
label: Additional context

4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
<!-- What steps need to be taken to test this PR? -->


## Release Notes
<!-- A digestable summary of the change in this PR -->
## Upgrade Notes
<!-- To upgrade from an older revision of charmed prometheus, ... -->
3 changes: 3 additions & 0 deletions .jujuignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/venv
*.py[cod]
*.charm
.wokeignore
cos-tool*

8 changes: 8 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ parts:
- pkg-config
- rustc
- cargo
cos-tool:
plugin: dump
source: .
build-packages:
- curl
override-pull: |
curl -L -O https://github.com/canonical/cos-tool/releases/latest/download/cos-tool-${CRAFT_TARGET_ARCH}
chmod +x cos-tool-*
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _on_certificate_removed(self, event: CertificateRemovedEvent):
import logging
from typing import List

from jsonschema import exceptions, validate # type: ignore[import]
from jsonschema import exceptions, validate # type: ignore[import-untyped]
from ops.charm import CharmBase, CharmEvents, RelationBrokenEvent, RelationChangedEvent
from ops.framework import EventBase, EventSource, Handle, Object

Expand All @@ -109,7 +109,7 @@ def _on_certificate_removed(self, event: CertificateRemovedEvent):

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 4
LIBPATCH = 5

PYDEPS = ["jsonschema"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def _events(self):

@property
def credentials(self):
"""Return the credentials, if any; otherwise, return None."""
if not all(
self._is_not_empty(x)
for x in [
Expand Down
Loading

0 comments on commit 10868a4

Please sign in to comment.