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

Issue/8294 strip more #8320

Closed
wants to merge 24 commits into from
Closed

Issue/8294 strip more #8320

wants to merge 24 commits into from

Conversation

wouterdb
Copy link
Contributor

@wouterdb wouterdb commented Nov 6, 2024

Description

Strip version and status

closes #8252

Self Check:

Strike through any lines that are not applicable (~~line~~) then check the box

  • Attached issue to pull request
  • Changelog entry
  • Type annotations are present
  • Code is clear and sufficiently documented
  • No (preventable) type errors (check using make mypy or make mypy-diff)
  • Sufficient test cases (reproduces the bug/tests the requested feature)
  • Correct, in line with design
  • 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 for more info)

src/inmanta/db/versions/v202410310.py Outdated Show resolved Hide resolved
tests/test_cli.py Outdated Show resolved Hide resolved

result = await cli.run("monitor", "-e", environment)
assert result.exit_code == 0
print(result.output)
Copy link
Contributor

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

Copy link
Contributor Author

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

Comment on lines 814 to 815
# {'by_state': {'available': 3, 'cancelled': 0, 'deployed': 12, 'deploying': 0, 'failed': 0, 'skipped': 0,
# 'skipped_for_undefined': 0, 'unavailable': 0, 'undefined': 0}, 'total': 15}
Copy link
Contributor

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

Copy link
Contributor Author

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

changelogs/unreleased/8252-remove-deploy-status.yml Outdated Show resolved Hide resolved
@wouterdb wouterdb requested a review from Hugo-Inmanta November 6, 2024 13:27
changelogs/unreleased/8252-remove-deploy-status.yml Outdated Show resolved Hide resolved
@@ -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.
Copy link
Contributor

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.

Comment on lines 2526 to 2540
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"]
)
Copy link
Contributor

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.

@wouterdb wouterdb requested a review from arnaudsjs November 6, 2024 16:09
@wouterdb wouterdb added the merge-tool-ready This ticket is ready to be merged in label Nov 7, 2024
@inmantaci
Copy link
Contributor

Processing this pull request

@inmantaci
Copy link
Contributor

Merged into branches master in c595ef6

@inmantaci inmantaci closed this Nov 7, 2024
inmantaci pushed a commit that referenced this pull request Nov 7, 2024
… 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)
@inmantaci inmantaci deleted the issue/8294_strip_more branch November 7, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-tool-ready This ticket is ready to be merged in
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove deployed field from ConfigurationModel
4 participants