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: add general node checks for az iot ops check pre-requisite checks #182

Merged
merged 18 commits into from
Apr 26, 2024

Conversation

vilit1
Copy link
Contributor

@vilit1 vilit1 commented Apr 9, 2024

### make sure to credit ryan for POC

image
Some minor refactoring:

  • adding maps to enums
  • moving functions out of base.py to a folder (base) with file names to categorize these functions
  • renaming of some to make more sense (from a quick look perspective)
  • COLOR_STR_FORMAT

Added general node checks (and removed outdated one):

  • try to have one node (ok if more but warn)
  • at least 4 cpus per node
  • 30 g of storage
  • 16 g of memory

make sure to credit ryan for POC

Future tasks (see added the TODO's)

  • additional refactoring
    • padding
    • add unit tests for other base funcs

Visual examples:
Success:
image

Errors + Warnings:
image

make sure to credit ryan for POC


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).

@vilit1 vilit1 marked this pull request as ready for review April 16, 2024 21:28
@vilit1 vilit1 requested a review from digimaun as a code owner April 16, 2024 21:28
@vilit1 vilit1 marked this pull request as draft April 16, 2024 22:06
@vilit1 vilit1 marked this pull request as ready for review April 16, 2024 23:57
@vilit1
Copy link
Contributor Author

vilit1 commented Apr 24, 2024

Pre check change following this table:
image
Note that AIO pre means precheck only if AIO is NOT deployed

No AIO Deployments

nothing specified (run both)
image

run only pre
image

run only post
image

AIO deployment present

nothing specified (run only post)
image

run only pre
image

run both pre and post
image

weird condition (why would anyone do this)

pre and post both false
image

This is also tested via the int tests:

No AIO deployments
image

Aio deployed
image

@c-ryan-k
Copy link
Member

Some thoughts around pre/post:

  • if pre == false and post == false, maybe we should return an error ("you cannot run checks by disabling all checks, etc")
  • if pre == true, but AIO is deployed, should we not show post?

My thinking is more along the lines of:

  • If AIO is deployed:
    • run post only unless --post is false
    • do not run pre unless --pre is true
  • If AIO is not deployed
    • run pre unless --pre is false
    • do not run post unless --post is true

Thoughts? I guess I can understand either way, but I figured we could use AIO's status as the default (post || pre) and then let the switches override those.

@vilit1
Copy link
Contributor Author

vilit1 commented Apr 26, 2024

catering to the popular demand
image

@c-ryan-k
Copy link
Member

c-ryan-k commented Apr 26, 2024

image

just needs one little lint fix

@vilit1 vilit1 merged commit 0adfe85 into Azure:dev Apr 26, 2024
16 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.

None yet

4 participants