Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iterate over fstab entries instead of relation data #66

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

lucabello
Copy link
Contributor

@lucabello lucabello commented Mar 4, 2024

Issue

Closes #56.

Solution

Instead of iterating over log slots in relation data, we iterate over fstab entries; this way, the behavior for 1. multiple logs slots being defined and 2. multiple paths in the same log slot, should be correct.

Testing Instructions

Deploy grafana-agent and relate it to the PostgreSQL charm or a charm with multiple slots.


This has been manually tested with the PostgreSQL charm and it produces all the scrape jobs correctly.

@lucabello lucabello marked this pull request as ready for review March 5, 2024 09:40
Copy link
Contributor

@IbraAoad IbraAoad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going with this approach, I think the entry method in the SnapFstabis redundant now don't you think?

src/charm.py Show resolved Hide resolved
tests/scenario/test_machine_charm/test_scrape_configs.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
@lucabello lucabello requested review from dstathis and IbraAoad March 7, 2024 11:30
src/charm.py Outdated Show resolved Hide resolved
@lucabello lucabello requested a review from IbraAoad March 7, 2024 12:55
@lucabello lucabello merged commit 58f7ae4 into main Mar 7, 2024
13 checks passed
@lucabello lucabello deleted the fix/log-slots-bug branch March 26, 2024 14:55
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.

Duplicated jobs for logs when using log_slots
3 participants