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

Fixes #9220: Accept environment names consisting only of integers. #9221

Closed
wants to merge 1 commit into from

Conversation

saimonn
Copy link

@saimonn saimonn commented Jan 23, 2024

See #9220 for motivations behind this pull-request

@saimonn saimonn requested a review from a team as a code owner January 23, 2024 23:44
@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@CLAassistant
Copy link

CLAassistant commented Jan 23, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

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

Hi thanks for your PR, but unfortunately we've had issues in the past with confusion between symbols and strings in environment names. We don't want to reintroduce string-based names. See a6e0a6b and ceb7c01

I think you'll want to add some debugging to

indirection, method, key, params = uri2indirection(request.method, request.path, request.params)
to see if puppetserver is passing the environment request parameter as an integer when calling into puppet? Or if something in the indirected routes is coercing the string to an integer. It should be a string by the time we reach
environment = params.delete(:environment)

It's probably this

Probably want to special case environment since we know that shouldn't be coerced to integer and we don't want to break compatibility.

@joshcooper
Copy link
Contributor

Hi @saimonn have you had a chance to review my comments? We'd welcome a pull request if you can incorporate those changes, thanks!

@saimonn
Copy link
Author

saimonn commented Apr 11, 2024

Hi @joshcooper, thanks for the reminder!

I don't have enough time nor ruby knowledge to dig further on this PR.

We ended by prefixing our branches/environment names with letters as a workaround.

You can close this PR unless you find someone else with resources to address it.

@joshcooper
Copy link
Contributor

Ok, thanks for letting us know. I'm going to close this for now.

@joshcooper joshcooper closed this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants