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

diagnostic run command fails to clean up project and token data. #3332

Closed
teknofire opened this issue Apr 9, 2020 · 0 comments
Closed

diagnostic run command fails to clean up project and token data. #3332

teknofire opened this issue Apr 9, 2020 · 0 comments
Labels
auth-team anything that needs to be on the auth team board bug 🐛 Something isn't working customer-reported issues reported by customers Epic

Comments

@teknofire
Copy link
Contributor

teknofire commented Apr 9, 2020

Describe the bug

When running chef-automate diagnostic run project data is left behind and shows up in the UI. The user will then have to delete any rules in the project before they can delete the project itself. In addition, it will create an API token that doesn't get cleaned up.

To Reproduce

Steps to reproduce the behavior:

  • run chef-automate diagnostics run and wait for it to complete.
  • Browse to Settings -> Projects and you will see one or more projects with a name similar to iam-projects-integration-diagnostic-20200409190229 test project
  • Browse to Settings -> Tokens and you will see one or more tokens with a name similar to This token was generated by the chef-automate diagnostic tool. It has admin level access on the entire Automate API.

Expected behavior

After running the chef-automate diagnostics run any data that was created should be removed during the clean up.

Screenshots

If applicable, add screenshots to help explain your problem.
Chef Automate 2020-04-09 12-07-56

Versions (please complete the following information):

  • OS: Centos 7
  • Browser: Chrome
  • Automate Build Number: Build: 20200325163209
@teknofire teknofire added the bug 🐛 Something isn't working label Apr 9, 2020
@susanev susanev added this to the Auth: Sprint 13 milestone Apr 9, 2020
@susanev susanev added auth-team anything that needs to be on the auth team board and removed needs-triage labels Apr 15, 2020
@srenatus srenatus self-assigned this Apr 21, 2020
@susanev susanev added the Epic label Apr 21, 2020
bcmdarroch pushed a commit that referenced this issue Apr 22, 2020
* diagnostics: delete rule and project

Before, the error was swallowed by the usage of the helper methods.

The swallowed error gave away that the project delete wouldn't really remove its
rules, they had to be removed separately.

* diagnostics: small misc fixes

* diagnostics/iam: fix error checking

.Error() would only check `err` from `resp, err := ...`, the idiom
 it's replaced with also checks the HTTP status.

Signed-off-by: Stephan Renatus <[email protected]>
@susanev susanev closed this as completed Apr 28, 2020
@susanev susanev added the customer-reported issues reported by customers label May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-team anything that needs to be on the auth team board bug 🐛 Something isn't working customer-reported issues reported by customers Epic
Projects
None yet
Development

No branches or pull requests

3 participants