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 error message on service length #12012

Merged
merged 4 commits into from
Feb 5, 2022

Conversation

rkarthick
Copy link
Contributor

@rkarthick rkarthick commented Feb 4, 2022

Currently if len(service name) > 63, the API incorrectly reports the issue to be "not a valid RFC 1123" misleading the developer. Changed the wording to ensure it reflects the correct logic

@hashicorp-cla
Copy link

hashicorp-cla commented Feb 4, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @rkarthick 🙂

While reviewing the PR I noticed that the same error message was being returned by ValidateName, but I think that we were not using it because when it's called from the structs package it's passed a version of the service name with some place holders for environment variables.

So rather than copying over the message, I changed the method to not add the service name and leave that up to the caller.

@lgfa29 lgfa29 merged commit 16485f4 into hashicorp:main Feb 5, 2022
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants