Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow dashes in port names (again) #517

Merged
merged 2 commits into from
May 3, 2024
Merged

Allow dashes in port names (again) #517

merged 2 commits into from
May 3, 2024

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented May 2, 2024

Description

Fixes #514

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

@nightkr nightkr requested a review from a team May 2, 2024 14:47
Copy link
Member

@sbernauer sbernauer 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 fixing! All other cases should be handled

As with Kubernetes names in general, names for ports must only contain lowercase alphanumeric characters and -. Port names must also start and end with an alphanumeric character.

Just for the record from #514 (comment)

I'd argue that 123-abc is far less common, and while switching to a PORT_ prefix would fix it, I'm not sure it's worth the compatibility break.

@sbernauer
Copy link
Member

Thinking about it, would anything else than rust/operator-binary/src/hdfs_controller.rs be affected by adding a PORT_ prefix?
We set e.g. dfs.datanode.registered.port to ${env.DATA_PORT}, shouldn't his be unnoticed by customers?

@nightkr
Copy link
Member Author

nightkr commented May 3, 2024

(Merging since digit-prefixed ports are a separate fix anyway, but can continue discussing in here or make a new issue)

We set e.g. dfs.datanode.registered.port to ${env.DATA_PORT}, shouldn't his be unnoticed by customers?

In the default configuration, no. But they can still use ${env.} references in their own config overrides, which would be broken by it.

@nightkr nightkr added this pull request to the merge queue May 3, 2024
@nightkr
Copy link
Member Author

nightkr commented May 3, 2024

It would definitely have been better to do it that way from the start. Now we have the tradeoff to make.

Merged via the queue into main with commit 5a01d4a May 3, 2024
30 checks passed
@nightkr nightkr deleted the bugfix/dashed-port branch May 3, 2024 10:57
@sbernauer
Copy link
Member

I think the likelihood of someone doing that is very very unlikely and I personally would prefer to be safe in the long run

@nightkr
Copy link
Member Author

nightkr commented May 3, 2024

To be clear, the options here are:

  • Break previously-working configurations during routine upgrades, with an unclear cause or path forward
  • Break when applying a new configuration that trips over the edge case, which can easily be reverted

@sbernauer
Copy link
Member

Honestly I don't care to much, I leave it up to you

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port names with dashes are not supported in sidecar containers
2 participants