Skip to content

Conversation

@stevekeay
Copy link
Contributor

Hacking on the ml2 driver plugin feels very uncertain due to the large number of inter-dependencies that the driver code has, and the poorly-documented API with confusing concepts, like the "context" argument means different things in different places.

I don't know if this is a valid approach to documenting the API, but adding type hints or comprehensive documentation upstream seems unlikely to be a quick or easy win, while this gets a bit of autocomplete working with minimal effort. While these type hints will surely get out of date, I assume that the ml2 API would be evolving quite slowly, so we won't see too much drift.

@stevekeay stevekeay requested a review from Copilot April 7, 2025 17:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@stevekeay stevekeay changed the title Retrofit type hints to neutron ml2 driver plugin API chore: Retrofit type hints to neutron ml2 driver plugin API to improve dx Apr 7, 2025
@stevekeay stevekeay force-pushed the hints branch 3 times, most recently from 60bf094 to a568a83 Compare April 13, 2025 09:15
Copy link
Collaborator

@skrobul skrobul left a comment

Choose a reason for hiding this comment

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

LGTM, my only minor nitpick is usage of relative imports which is prohibited in Openstack's style guide but I'm not sure if we need to follow the same guide

Copy link
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

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

Yeah I'm okay with the relative. I still think we should submit this upstream. One of the things they want to do is type annotate more parts of the code base this cycle and you've done that.

@cardoe
Copy link
Contributor

cardoe commented Apr 16, 2025

@stevekeay merge conflict with another PR of yours

@stevekeay stevekeay added this pull request to the merge queue Apr 16, 2025
Merged via the queue into main with commit 96131b2 Apr 16, 2025
27 checks passed
@stevekeay stevekeay deleted the hints branch April 16, 2025 20:46
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.

4 participants