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

FIX #42 - Downscaling Loki wipes its configuration #44

Merged
merged 15 commits into from
May 10, 2022
Merged

Conversation

Abuelodelanada
Copy link
Contributor

Issue

See #42

Solution

Now we are no longer checking the event type, we are only checking if we have loki_endpoints provided by the Provider side of the relation

Context

Testing Instructions

  1. Deploy grafana-agent
  2. Deploy 3 loki units
  3. Relate both charms juju add-relation grafana-agent loki
  4. Down scale Loki juju scale-application loki 2
  5. Verify that loki section in grafana-agent config file is NOT empty: juju ssh --container agent agent/0 cat /etc/agent/agent.yaml

Release Notes

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs and commit the updated libs
to your PR branch.

stdout
Library charms.observability_libs.v0.kubernetes_service_patch was already up to date in version 0.6.                                                           
Library charms.prometheus_k8s.v0.prometheus_scrape was already up to date in version 0.17.                                                                     
Library charms.loki_k8s.v0.loki_push_api updated to version 0.10.              
Library charms.prometheus_k8s.v0.prometheus_remote_write updated to version 0.3.                                                                               

stderr

tests/unit/test_charm.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mmanciop mmanciop left a comment

Choose a reason for hiding this comment

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

I’d like to see a cleanup of the excessive mocking in the tests. The rest LGTM.

@mmanciop mmanciop changed the title FIX #42 - Downscaling Loki results in a bad config FIX #42 - Downscaling Loki wipes its configuration Apr 8, 2022
tests/unit/test_charm.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mmanciop mmanciop left a comment

Choose a reason for hiding this comment

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

.

dstathis
dstathis previously approved these changes Apr 8, 2022
sed-i
sed-i previously approved these changes Apr 11, 2022
tests/unit/test_charm.py Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented May 5, 2022

Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs and commit the updated libs
to your PR branch.

stdout
Library charms.loki_k8s.v0.loki_push_api was already up to date in version 0.10.                                                                               
Library charms.observability_libs.v0.kubernetes_service_patch was already up to date in version 0.6.                                                           
Library charms.prometheus_k8s.v0.prometheus_remote_write updated to version 0.4.                                                                               
Library charms.prometheus_k8s.v0.prometheus_scrape updated to version 0.19.    

stderr

@github-actions
Copy link

github-actions bot commented May 6, 2022

Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs and commit the updated libs
to your PR branch.

stdout
Library charms.loki_k8s.v0.loki_push_api has local changes, cannot be updated. 
Library charms.observability_libs.v0.kubernetes_service_patch was already up to date in version 0.6.                                                           
Library charms.prometheus_k8s.v0.prometheus_remote_write updated to version 0.4.                                                                               
Library charms.prometheus_k8s.v0.prometheus_scrape updated to version 0.19.    

stderr

@simskij
Copy link
Member

simskij commented May 10, 2022

Tests currently failing. Waiting to do a final review until it passes again.

tests/unit/test_charm.py Outdated Show resolved Hide resolved
tests/unit/test_charm.py Outdated Show resolved Hide resolved
tests/unit/test_charm.py Show resolved Hide resolved
tests/unit/test_charm.py Outdated Show resolved Hide resolved
@github-actions
Copy link

Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs and commit the updated libs
to your PR branch.

stdout
Library charms.loki_k8s.v0.loki_push_api has local changes, cannot be updated. 
Library charms.observability_libs.v0.kubernetes_service_patch was already up to date in version 0.6.                                                           
Library charms.prometheus_k8s.v0.prometheus_remote_write updated to version 0.4.                                                                               
Library charms.prometheus_k8s.v0.prometheus_scrape updated to version 0.19.    

stderr

@github-actions
Copy link

Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs and commit the updated libs
to your PR branch.

stdout
Library charms.loki_k8s.v0.loki_push_api has local changes, cannot be updated. 
Library charms.observability_libs.v0.kubernetes_service_patch was already up to date in version 0.6.                                                           
Library charms.prometheus_k8s.v0.prometheus_remote_write updated to version 0.4.                                                                               
Library charms.prometheus_k8s.v0.prometheus_scrape updated to version 0.19.    

stderr

@Abuelodelanada Abuelodelanada requested review from sed-i and removed request for mmanciop May 10, 2022 14:28
src/charm.py Show resolved Hide resolved
@Abuelodelanada Abuelodelanada merged commit 7143b21 into main May 10, 2022
@Abuelodelanada Abuelodelanada deleted the bad_config branch May 10, 2022 19: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.

None yet

5 participants