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

[DO NOT MERGE] "Manager SDK" Prototype #1648

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

daniellacosse
Copy link
Contributor

@daniellacosse daniellacosse commented Feb 26, 2025

See setup details in the README.


With this, we can successfully call the Management API from the browser:

results

Copy link

Important

The terms of service for this installation has not been accepted. Please ask the Organization owners to visit the Gemini Code Assist Admin Console to sign it.

export type * from './generated';

export default (baseUrl: string) => {
client.setConfig({ baseUrl, headers: { "ngrok-skip-browser-warning": "69420" } });
Copy link
Contributor Author

@daniellacosse daniellacosse Feb 26, 2025

Choose a reason for hiding this comment

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

One of the gotchas, this doesn't work without this header (ngrok sends a warning HTML file otherwise)

// Start Prometheus subprocess and wait for it to be up and running.
const prometheusConfigFilename = getPersistentFilename('prometheus/config.yml');
const prometheusTsdbFilename = getPersistentFilename('prometheus/data');
// TODO: Figure out why prometheus crashes infinitely.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oddly, Prometheus continuously crashes while ngrok is active. Needs further investigation.

// ipv6 loopback address doesn't work
addr: `https://127.0.0.1:${process.env.SB_API_PORT || 8081}`,
authtoken_from_env: true,
verify_upstream_tls: false,
Copy link
Contributor Author

@daniellacosse daniellacosse Feb 26, 2025

Choose a reason for hiding this comment

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

We need to both turn off upstream verification and forward the SSL CERT/KEY files for ngrok to successfully connect to our local service.

FWIW, the ngrok cli does not seem to have this limitation - however, I was asked to uninstall that by Google Security.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also - where would we want this to live?

{test: /\.ts(x)?$/, use: 'ts-loader'},
{
test: /\.node$/,
loader: 'node-loader',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a gotcha - the ngrok javascript SDK pulls in binaries that webpack doesn't know how to handle. This loader is needed for the server to build.

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

Successfully merging this pull request may close these issues.

1 participant