-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add event handler for custom notice; Add Juju actions #28
Conversation
f94689a
to
cc8c486
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a first quick pass, overall looks good, but also want to deploy it and test with the example PMR.
27ebe9e
to
19ff454
Compare
Note that I am encountering the following issue as well: #38, which fortunately isn't a blockers as the integration tests still pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @mvlassis!
One high level suggestion that I saw is that if we don't have trust
in the charm, then it could error on config-changed
and the status doesn't align. Let's look into if we could detect if the charm has trust via ops
(although I doubt it).
If we can't, then maybe it'll make sense to have have an exception handling for ApiError
with 403.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mvlassis ! A couple comments.
e459734
to
f41d16c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took one more look, @mvlassis @DnPlas really good catch to also update profiles with update-status
and config-changed
!
Am OK from my side to not go with a component for now. Only a nit on whether we could avoid having multiple similar functions. But if you feel this doesn't add too much value feel free to resolve.
LGTM otherwise!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mvlassis, a second round of reviews! Left some comments.
172984d
to
6fb3513
Compare
…yncing the profiles
Co-authored-by: Daniela Plascencia <[email protected]>
65f4bdb
to
c8798c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mvlassis ! Just a thing about actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mvlassis !
Closes #21, #24, #32
This PR adds the event handler for the
PebbleCustomNotice
event that syncs the Profiles based on the PMR found in the following path:<repository>/<pmr-yaml-path>
.Additionally, the 3 Juju actions
sync-now
,list-stale-profiles
, anddelete-stale-profiles
have been implemented. They can be called withjuju run github-profiles-automator/0 sync-now
etc.Tests
_get_pmr_from_yaml()
have been added. Note that we haven't added any integration tests, since the full functionality ofcreate_or_update_profiles()
of theprofiles_management
library has not been added.sync-now
,list-stale-profiles
, anddelete-stale-profiles
.