-
Notifications
You must be signed in to change notification settings - Fork 7
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
Issue/8294 strip more #8320
Issue/8294 strip more #8320
Conversation
tests/test_cli.py
Outdated
|
||
result = await cli.run("monitor", "-e", environment) | ||
assert result.exit_code == 0 | ||
print(result.output) |
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.
Should be removed or asserted vs an expected output probably
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.
it is hard to assert anything usefull, because the progress bar updates the output, so when the test is done, there is not much to see.
I'll remove it
src/inmanta/main.py
Outdated
# {'by_state': {'available': 3, 'cancelled': 0, 'deployed': 12, 'deploying': 0, 'failed': 0, 'skipped': 0, | ||
# 'skipped_for_undefined': 0, 'unavailable': 0, 'undefined': 0}, 'total': 15} |
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.
This doesn't feel right at a glance, probably only relevant for the resource container in tests
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.
You mean the comment? I'll remove it
Co-authored-by: Hugo-Inmanta <[email protected]>
…re into issue/8294_strip_more
@@ -1027,10 +1018,6 @@ def convert_legacy_state( | |||
|
|||
def post_deploy_update() -> None: | |||
assert model_version is not None # mypy can't figure this out | |||
# Make sure tasks are scheduled AFTER the tx is done. |
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.
I think we can remove the assertion as wel.
tests/conftest.py
Outdated
result = await client.resource_list(env_id, deploy_summary=True) | ||
assert result.code == 200 | ||
summary = result.result["metadata"]["deploy_summary"] | ||
# {'by_state': {'available': 3, 'cancelled': 0, 'deployed': 12, 'deploying': 0, 'failed': 0, 'skipped': 0, | ||
# 'skipped_for_undefined': 0, 'unavailable': 0, 'undefined': 0}, 'total': 15} | ||
total: int = summary["total"] | ||
|
||
done = ( | ||
summary["by_state"]["deployed"] | ||
+ summary["by_state"]["failed"] | ||
+ summary["by_state"]["skipped"] | ||
+ summary["by_state"]["skipped_for_undefined"] | ||
+ summary["by_state"]["unavailable"] | ||
+ summary["by_state"]["undefined"] | ||
) |
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.
Shouldn't we isolate this logic into a method. It's used twice in this method.
Co-authored-by: arnaudsjs <[email protected]>
Processing this pull request |
Merged into branches master in c595ef6 |
… PR #8320) # Description Strip version and status closes #8252 # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [x] Attached issue to pull request - [x] Changelog entry - [x] Type annotations are present - [x] Code is clear and sufficiently documented - [x] No (preventable) type errors (check using make mypy or make mypy-diff) - [x] Sufficient test cases (reproduces the bug/tests the requested feature) - [x] Correct, in line with design - [X] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) - [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)
Description
Strip version and status
closes #8252
Self Check:
Strike through any lines that are not applicable (
~~line~~
) then check the box