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

Bug/KRV-1495: Invalid tenant name doesn't fail node registration #33

Merged
merged 3 commits into from
Nov 17, 2021

Conversation

karthikk92
Copy link
Collaborator

@karthikk92 karthikk92 commented Nov 17, 2021

Description

Invalid tenant name doesn't fail node registration

GitHub Issues

Checklist:

  • [ x] I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • [ x] I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • [x ] Backward compatibility is not broken

How Has This Been Tested?

Throws proper error when wrong tenant name is passed
image (2)

@karthikk92 karthikk92 changed the title Bug/KRV-1411: tenant with same name is not working in multiarray environment Bug/KRV-1495: Invalid tenant name doesn't fail node registration Nov 17, 2021
prasar6
prasar6 previously approved these changes Nov 17, 2021
rensyct
rensyct previously approved these changes Nov 17, 2021
service/node.go Outdated
}else{
host, err := hostAPI.CreateHost(ctx, s.opts.LongNodeName, tenantID)
if err != nil {
return err
Copy link
Collaborator

Choose a reason for hiding this comment

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

@karthikk92 can we return the error as in if loop with message

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nope since if first time adding host entry fails, it will just retry by throwing just error and then finally if not added multiple tries then finally it will throw proper error message when array not added .

@karthikk92 karthikk92 dismissed stale reviews from rensyct and prasar6 via 2a1f4c9 November 17, 2021 15:24
@prasar6 prasar6 requested review from prasar6 and removed request for prasar6 November 17, 2021 15:45
@prasar6 prasar6 merged commit c6d9539 into main Nov 17, 2021
@rensyct rensyct deleted the bug_fix_tenant_changes branch March 21, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants