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

Expose stack on functions.yaml instead of stack.yaml. #1036

Merged
merged 3 commits into from
Feb 15, 2022
Merged

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Feb 9, 2022

Some contractual changes to how we expose the container contract:

  • We will expose __/functions.yaml instead of __/stack.yaml in the control api
  • Environment variables for exposing the control api changes from STACK_CONTROL_API_PORT to PORT and FUNCTIONS_CONTROL_API (whose value should equal true).

@@ -85,7 +85,8 @@ async function startBin(
env: {
PATH: process.env.PATH,
GLCOUD_PROJECT: 'test-project',
STACK_CONTROL_API_PORT: port,
PORT: port,
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for changing this to a more generic name? Isn't it likely that users might have this var set for other processes.

Copy link
Member

Choose a reason for hiding this comment

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

The original design used two ports: one for the general API and one for the "control" API. We discovered that Python cannot handle two ports on the same process, so we are consolidating on one port. $PORT is the standard env variable for Cloud Run, so we're using it too.

Choose a reason for hiding this comment

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

Thank you for your service.

Choose a reason for hiding this comment

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

Is ok

@@ -85,7 +85,8 @@ async function startBin(
env: {
PATH: process.env.PATH,
GLCOUD_PROJECT: 'test-project',
STACK_CONTROL_API_PORT: port,
PORT: port,
Copy link
Member

Choose a reason for hiding this comment

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

The original design used two ports: one for the general API and one for the "control" API. We discovered that Python cannot handle two ports on the same process, so we are consolidating on one port. $PORT is the standard env variable for Cloud Run, so we're using it too.

try {
const stack = await loadStack(functionsDir);
res.setHeader('content-type', 'text/yaml');
res.send(JSON.stringify(stack));
Copy link
Member

Choose a reason for hiding this comment

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

Lol. I guess JSON is technically YAML.

@taeold taeold merged commit b3a549d into master Feb 15, 2022
@taeold taeold deleted the dl-cf3-cc-fixes branch February 15, 2022 19:40
taeold added a commit that referenced this pull request Feb 17, 2022
taeold added a commit that referenced this pull request Feb 17, 2022
Copy link

@kaumbakahuma kaumbakahuma left a comment

Choose a reason for hiding this comment

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

Let's you give us direction of to do us a community,we are one.

@@ -85,7 +85,8 @@ async function startBin(
env: {
PATH: process.env.PATH,
GLCOUD_PROJECT: 'test-project',
STACK_CONTROL_API_PORT: port,
PORT: port,

Choose a reason for hiding this comment

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

Is ok

@kaumbakahuma
Copy link

I kaumbakahuma, I appreciate your help and support for this service from file Bass.
Let's continue to do so much for me.

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.

4 participants