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

feat: MQ v1beta1 support, renaming of Ops MQ #62

Merged
merged 16 commits into from
Nov 1, 2023
Merged

Conversation

c-ryan-k
Copy link
Member

This PR adds support for:

  • mq.iotoperations.azure.com/v1beta1 API
  • mq namespace / module refactoring

This also updates a few cloud connector properties that have changed between v1alpha4 and v1beta1


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Thank you for contributing to Azure IoT Operations tooling!

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

Intent for Production

  • It is expected that pull requests made to default or core branches such as dev or main are of production grade. Corollary to this, any merged contributions to these branches may be deployed in a public release at any given time. By checking this box, you agree and commit to the expected production quality of code.

Basic expectations

  • If introducing new functionality or modified behavior, are they backed by unit and/or integration tests?
  • In the same context as above are command names and their parameter definitions accurate? Do help docs have sufficient content?
  • Have all the relevant unit and integration tests pass? i.e. pytest <project root> -vv. Please provide evidence in the form of a screenshot showing a succesful run of tests locally OR a link to a test pipeline that has been run against the change-set.
  • Have linter checks passed using the .pylintrc and .flake8 rules? Look at the CI scripts for example usage.
  • Have extraneous print or debug statements, commented out code-blocks or code-statements (if any) been removed from the surface area of changes?
  • Have you made an entry in HISTORY.rst which concisely explains your user-facing feature or change?

Azure IoT Operations CLI maintainers reserve the right to enforce any of the outlined expectations.

A PR is considered ready for review when all basic expectations have been met (or do not apply).

@c-ryan-k c-ryan-k changed the title feat: v1beta1 support, renaming of aio ops mq feat: MQ v1beta1 support, renaming of Ops MQ Oct 31, 2023
@c-ryan-k c-ryan-k marked this pull request as ready for review November 1, 2023 17:58
@c-ryan-k c-ryan-k requested a review from digimaun as a code owner November 1, 2023 17:58
Comment on lines 28 to 33
MQ_API_V1A2 = EdgeResourceApi(group="mq.iotoperations.azure.com", version="v1alpha2", moniker="mq")
MQ_API_V1A3 = EdgeResourceApi(group="mq.iotoperations.azure.com", version="v1alpha3", moniker="mq")
MQ_API_V1A4 = EdgeResourceApi(group="mq.iotoperations.azure.com", version="v1alpha4", moniker="mq")
MQ_API_V1B1 = EdgeResourceApi(group="mq.iotoperations.azure.com", version="v1beta1", moniker="mq")

E4K_ACTIVE_API = E4K_API_V1A4
MQ_ACTIVE_API = MQ_API_V1B1
Copy link
Member Author

Choose a reason for hiding this comment

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

Just a note for discussion - are we leaving any of the previous alpha APIs?
Maybe just v1alpha4 and v1beta1?

Copy link
Member

Choose a reason for hiding this comment

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

We should start with only the latest for public preview, which Az IoT Ops CLI is intended for.

I don't see any benefit for supporting private preview versions.

Copy link
Member

Choose a reason for hiding this comment

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

Private preview customers can use the edge CLI if they need to, but that will quickly disappear.

@digimaun digimaun self-assigned this Nov 1, 2023
@@ -1069,8 +1071,8 @@ def display_topic_maps(
),
)
if detail_level == ResourceOutputDetailLevel.verbose.value:
delta_table = topic_mapping.get("deltaTable", {})
Copy link
Member

Choose a reason for hiding this comment

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

Ah these little changes

@@ -22,19 +24,19 @@

logger = get_logger(__name__)

E4K_APP_LABELS = [
'azedge-e4k-operator',
MQ_APP_LABELS = [
'broker',
'diagnostics',
Copy link
Member

Choose a reason for hiding this comment

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

are diagnostics, broker and health-manager labels still needed?

Copy link
Member Author

@c-ryan-k c-ryan-k Nov 1, 2023

Choose a reason for hiding this comment

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

The aio-mq-diagnostics-service, aio-mq-dmqtt-frontend/aio-mq-dmqtt-backend, and aio-mq-dmqtt-health-manager resources are using app=diagnostics, app=broker, and app=health-manager respectively.

  • app=diagnostics is used by
    • aio-mq-diagnostics-service
  • app=broker is used by
    • aio-mq-dmqtt-frontend
    • aio-mq-dmqtt-backend
    • aio-mq-dmqtt-authentication
  • app=health-manager is used by
    • aio-mq-dmqtt-health-manager

I'll raise a followup PR to update, but we actually just need to remove aio-mq-diagnostics-service from this list, since it uses app=diagnostics instead.

@@ -11,27 +11,22 @@
CheckTaskStatus,
Copy link
Member

Choose a reason for hiding this comment

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

The file name still has e4k in it

# Assert runtime resources
assert_list_deployments(mocked_client, mocked_zipfile, label_selector=E4K_LABEL, resource_api=E4K_API_V1A2)
assert_list_deployments(mocked_client, mocked_zipfile, label_selector=MQ_LABEL,
resource_api=MQ_API_V1B1, field_selector=f"metadata.name={AIO_MQ_OPERATOR}")
Copy link
Member

Choose a reason for hiding this comment

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

👍

@c-ryan-k c-ryan-k merged commit 8a32567 into Azure:dev Nov 1, 2023
13 checks passed
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.

2 participants