Skip to content

Parse THEIA_PORT environment variable#10511

Merged
garagatyi merged 1 commit intoeclipse-che:masterfrom
garagatyi:parseTheiaPort
Jul 24, 2018
Merged

Parse THEIA_PORT environment variable#10511
garagatyi merged 1 commit intoeclipse-che:masterfrom
garagatyi:parseTheiaPort

Conversation

@garagatyi
Copy link
Copy Markdown

What does this PR do?

Parse THEIA_PORT environment variable in Theia start.sh script
to prevent failure of Theia start on k8s when there is a k8s
service "theia" and k8s injects THEIA_PORT environment variable
with a value such as tcp://19.19.191.19:3000

What issues does this PR fix or reference?

Related to service discovery in Workspace.Next #9913

Release Notes

Docs PR

@garagatyi garagatyi requested a review from riuvshin as a code owner July 23, 2018 14:02
@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/question Questions that haven't been identified as being feature requests or bugs. labels Jul 23, 2018
theia_port_number_regexp='^[0-9]+$'
if ! [[ "$THEIA_PORT" =~ $theia_port_number_regexp ]]; then
# THEIA_PORT contains something other than a number
theia_port_uri_regexp='^tcp://[0-9a-zA-Z.]+:[0-9]+$'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would name it like theia_port_tcp_uri_regexp because of hardcoded value.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

@mmorhun mmorhun removed the kind/question Questions that haven't been identified as being feature requests or bugs. label Jul 24, 2018
@benoitf benoitf added the kind/question Questions that haven't been identified as being feature requests or bugs. label Jul 24, 2018
Parse THEIA_PORT environment variable in Theia start.sh script
to prevent failure of Theia start on k8s when there is a k8s
service "theia" and k8s injects THEIA_PORT environment variable
with a value such as tcp://19.19.191.19:3000
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>

Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
@garagatyi garagatyi merged commit 7d3d1cc into eclipse-che:master Jul 24, 2018
@garagatyi garagatyi deleted the parseTheiaPort branch July 24, 2018 08:08
@benoitf benoitf added this to the 6.9.0 milestone Jul 24, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/question Questions that haven't been identified as being feature requests or bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants