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

feat: add support for gateway race configuration via wrangler secret #100

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

vasco-santos
Copy link
Contributor

This PR adds support for gateway race configuration via wrangler secret.

To avoid potential issues with setting up invalid secret, we validate and default to hardcoded values if given secret is not a valid one. For better observability, race configuration was added to GET /version and invalid values are logged.

@vasco-santos vasco-santos force-pushed the feat/add-dagula-gateway-to-staging branch 2 times, most recently from 1b78f54 to 41a312e Compare October 12, 2022 12:36
packages/edge-gateway/src/env.js Outdated Show resolved Hide resolved
packages/edge-gateway/src/env.js Outdated Show resolved Hide resolved
/**
* @param {string} input
*/
function getListFromInput (input) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function getListFromInput (input) {
function parseGatewayUrls (json) {

/**
* @param {Env} env
*/
function setGatewayRace (env) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function setGatewayRace (env) {
function addGatewayRacersToEnv (env) {

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
@vasco-santos vasco-santos force-pushed the feat/add-dagula-gateway-to-staging branch from c0578ad to e5e877f Compare October 12, 2022 14:37
@vasco-santos vasco-santos force-pushed the feat/add-dagula-gateway-to-staging branch 2 times, most recently from 88b0c54 to aa787a0 Compare October 12, 2022 14:51
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.

2 participants