-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: validate ops.main() call for operator framework charms #1883
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dimaqq
force-pushed
the
wip-ast-ops-main-extras
branch
2 times, most recently
from
September 6, 2024 08:03
c32422e
to
2b201a0
Compare
lengau
requested changes
Sep 6, 2024
dimaqq
force-pushed
the
wip-ast-ops-main-extras
branch
from
September 9, 2024 07:48
ff76cec
to
c0529e5
Compare
Rebased. |
lengau
reviewed
Sep 12, 2024
dimaqq
force-pushed
the
wip-ast-ops-main-extras
branch
from
September 20, 2024 01:02
95a950d
to
8c87a50
Compare
rebased and squashed |
cc @mr-cal if a second reviewer is needed to merge. |
3 tasks
lengau
reviewed
Sep 20, 2024
lengau
approved these changes
Sep 20, 2024
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.
Looks great, thanks!
mr-cal
approved these changes
Sep 21, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 26, 2024
The `ops.main` entry point will be properly typed starting with the upcoming release, ops==2.17.0 This PR updates the templates so that new charms use the fixed type hints. It is paired with #1883 where charmcraft analyse validates that ops.main is called. We'll be relying on charm repo static type checker to validate that ops.main is called with correct arguments. - [x] wait for ops 2.17.0 to be released - [x] update ops version in the templates - [x] update ops.main() call in the templates https://warthogs.atlassian.net/browse/CHARMTECH-276 parent: https://warthogs.atlassian.net/browse/CHARMTECH-219 --------- Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira: https://warthogs.atlassian.net/browse/CHARMTECH-223
Parent: https://warthogs.atlassian.net/browse/CHARMTECH-219
The idea is to validate that the charm initialises the operator framework correctly:
ops.main(...)
call with this PR# type: ignore
on the callops.main