Skip to content

Commit

Permalink
Pydantic version bump (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
IbraAoad authored Apr 6, 2024
1 parent d99c5d1 commit 5115a06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/charms/grafana_agent/v0/cos_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ class _MetricsEndpointDict(TypedDict):

class CosAgentProviderUnitData(pydantic.BaseModel):
"""Unit databag model for `cos-agent` relation."""

class Config:
arbitrary_types_allowed = True
# The following entries are the same for all units of the same principal.
# Note that the same grafana agent subordinate may be related to several apps.
# this needs to make its way to the gagent leader
Expand All @@ -273,7 +274,8 @@ class CosAgentProviderUnitData(pydantic.BaseModel):

class CosAgentPeersUnitData(pydantic.BaseModel):
"""Unit databag model for `peers` cos-agent machine charm peer relation."""

class Config:
arbitrary_types_allowed = True
# We need the principal unit name and relation metadata to be able to render identifiers
# (e.g. topology) on the leader side, after all the data moves into peer data (the grafana
# agent leader can only see its own principal, because it is a subordinate charm).
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ git+https://github.com/canonical/operator#egg=ops
git+https://github.com/canonical/charm-relation-interfaces.git@main
jinja2 < 3
markupsafe == 2.0.1
pydantic < 2
pydantic > 2

0 comments on commit 5115a06

Please sign in to comment.