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

api: u.pro.services.disable.v1 #3033

Merged
merged 3 commits into from
Apr 5, 2024
Merged

api: u.pro.services.disable.v1 #3033

merged 3 commits into from
Apr 5, 2024

Conversation

orndorffgrant
Copy link
Collaborator

Why is this needed?

This is based on #3015 so that should be merged first.

This introduces u.pro.services.disable.v1 but does not refactor the cli disable command to use it.

Test Steps

New tests should pass

Checklist

  • I have updated or added any unit tests accordingly
  • I have updated or added any integration tests accordingly
  • Changes here need to be documented, and this was done in:

Does this PR require extra reviews?

  • Yes
  • No

Copy link

github-actions bot commented Apr 2, 2024

Jira: This PR is not related to a Jira item. (The PR title does not include a SC-#### reference)

GitHub Issues: No GitHub issues are fixed by this PR. (No commits have Fixes: #### references)

Launchpad Bugs: No Launchpad bugs are fixed by this PR. (No commits have LP: #### references)

Documentation: The changes in this PR do not require documentation changes.

👍 this comment to confirm that this is correct.

Copy link

github-actions bot commented Apr 2, 2024

🌎 This PR changes translatable messages. 🌏

Please select which scenarios apply. For further explanation, please read our policy on message changes.

  • New messages are being added.
    • We will ask translators to take a look and add translations if they have time, but it will not block this PR.
  • Existing messages are being changed.
    • ⚠️ Please add a comment with justification of why messages are being altered.
    • If the changes are trivial (e.g. a typo fix), then translations must be preserved.
    • If the changes are substantial, then we will ask translators to take a look and update translations if they have time, but it will not block this PR.
  • Existing messages are being deleted.
    • No special action needed.

Comment on lines 72 to 82
ent_cls = entitlements.entitlement_factory(cfg=cfg, name=options.service)
entitlement = ent_cls(
cfg,
assume_yes=True,
called_name=options.service,
purge=options.purge,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's verify if the user provided an invalid service

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The exception already raised looks pretty good and I added it to the integration test. It looks like this:

        {
          "code": "entitlement-not-found",
          "meta": {
            "entitlement_name": "invalid"
          },
          "title": "could not find entitlement named \"invalid\""
        }


enabled_services_after = _enabled_services_names(cfg)

progress.finish()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we update the status cache and send the activity ping to the CS here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In standup we decided:
yes update status cache
no don't send activity ping (it will send on a timer anyway)

@orndorffgrant
Copy link
Collaborator Author

@lucasmoura updated!

@lucasmoura
Copy link
Contributor

CI errors are unrelated

@lucasmoura lucasmoura merged commit 67be62f into main Apr 5, 2024
21 of 24 checks passed
@lucasmoura lucasmoura deleted the api-disable-finally branch April 5, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants