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

Improve AMS error experience #1247

Merged
merged 4 commits into from
Oct 26, 2023
Merged

Conversation

ivan-degtiarenko
Copy link
Contributor

Description

Broaden amount of error codes that return an extended error message + give customer alternative if going to /openshift URL does not work

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.
  • Add secret to app-interface Vault or Secrets Manager if necessary
  • RDS changes were e2e tested manually
  • Check AWS limits are reasonable for changes provisioning new resources

Test manual

TODO: Add manual testing efforts

# To run tests locally run:
make db/teardown db/setup db/migrate
make ocm/setup OCM_OFFLINE_TOKEN=<ocm-offline-token> OCM_ENV=development
make verify lint binary test test/integration

@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development September 8, 2023 13:32 — with GitHub Actions Inactive
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development September 8, 2023 13:32 — with GitHub Actions Inactive
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development September 8, 2023 13:32 — with GitHub Actions Inactive
@openshift-ci openshift-ci bot added the approved label Sep 8, 2023
@@ -770,8 +770,8 @@ func FailedClusterAuthorization(err error) *ServiceError {
reason := "failed to reserve quota"
// Visiting the OpenShift page in console registers the user and their organisation with OCM.
// See https://issues.redhat.com/browse/SDB-3194 for more context.
if svcErr.Is404() {
reason += " - visit https://console.redhat.com/openshift and try again"
if svcErr.Is404() || svcErr.IsForbidden() {
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I know visiting https://console.redhat.com/openshift does not help when AMS returns 403. So I'd split this off from the 404 case and maybe condense the error message a bit.

@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development October 25, 2023 15:51 — with GitHub Actions Inactive
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development October 25, 2023 15:51 — with GitHub Actions Inactive
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development October 25, 2023 15:51 — with GitHub Actions Inactive
pkg/errors/errors.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mtodor mtodor left a comment

Choose a reason for hiding this comment

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

Nice! It would be good to apply the suggestion from @stehessel before merging.

Co-authored-by: Stephan Hesselmann <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm label Oct 26, 2023
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development October 26, 2023 12:40 — with GitHub Actions Inactive
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development October 26, 2023 12:40 — with GitHub Actions Inactive
@ivan-degtiarenko ivan-degtiarenko temporarily deployed to development October 26, 2023 12:41 — with GitHub Actions Inactive
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivan-degtiarenko, mtodor, stehessel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ivan-degtiarenko,mtodor]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ivan-degtiarenko ivan-degtiarenko merged commit 9eab20a into main Oct 26, 2023
5 checks passed
@ivan-degtiarenko ivan-degtiarenko deleted the ivan/improve-ams-error-experience branch October 26, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants