Skip to content

Conversation

@dimaqq
Copy link

@dimaqq dimaqq commented Sep 4, 2024

Type hints are finally fixed for ops.main() call in the upcoming ops release.

The mypy config includes warn_unused_ignores in this repo, which means that using new ops will trigger an error soon.

P.S. can only be merged when ops 2.17.0 is released.

@dimaqq
Copy link
Author

dimaqq commented Sep 4, 2024

P.S. can be tested locally with:

diff --git a/requirements.txt b/requirements.txt
index 0eeaba6..c8a95c5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
 cosl
 distro
-ops >= 2.17.0
+git+https://github.com/canonical/operator.git@main#egg=ops
 jinja2
 redfish  # requests is included in this
 pydantic < 2

@rgildein
Copy link
Contributor

rgildein commented Sep 4, 2024

Hi @dimaqq I converted this PR to draft until 2.17 is not released, then we can convert it back and re-trigger CI.
Thanks for contribution!

@samuelallan72 samuelallan72 marked this pull request as ready for review October 2, 2024 01:41
@samuelallan72
Copy link

ops 2.17.0 is released, so I retriggered the CI and marked the PR as ready for review :)

Pjack
Pjack previously approved these changes Oct 4, 2024
@gabrielcocenza
Copy link
Member

Can't we unpin the ops library?

samuelallan72
samuelallan72 previously approved these changes Oct 7, 2024
@samuelallan72
Copy link

@dimaqq sorry, the CI is blocked on commits needing to be signed - could you gpg sign your commits (you can squash and force push to make it easier)?

@dimaqq dimaqq dismissed stale reviews from Pjack and samuelallan72 via 9a137e0 November 11, 2024 04:24
@dimaqq dimaqq force-pushed the chore-reenable-type-hints-on-ops-main branch from 58700d3 to 9a137e0 Compare November 11, 2024 04:24
@dimaqq
Copy link
Author

dimaqq commented Nov 11, 2024

Sorry I forgot to force-push earlier, here it is.

@dimaqq dimaqq force-pushed the chore-reenable-type-hints-on-ops-main branch 2 times, most recently from bb6feab to ef0a904 Compare November 11, 2024 04:36
@dimaqq
Copy link
Author

dimaqq commented Nov 11, 2024

re the other CI fail, I'll be releasing a hotfix for pypi:juju today 🙇🏻

@dimaqq dimaqq force-pushed the chore-reenable-type-hints-on-ops-main branch from ef0a904 to 9d33835 Compare November 11, 2024 05:20
@dimaqq
Copy link
Author

dimaqq commented Nov 15, 2024

The test fail is a mystery to me now.

@samuelallan72
Copy link

Hmm it looks like I already added the fix in another PR to fix the lint failure: #330 . So there arent any new changes in this PR apart from the temporary change to test with ops on main. I think we should simply close this PR without merging. Sorry for the confusion.

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.

6 participants