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

Update SSRC API client #2457

Merged
merged 6 commits into from
Feb 20, 2024
Merged

Update SSRC API client #2457

merged 6 commits into from
Feb 20, 2024

Conversation

erikeldridge
Copy link
Contributor

Internal client updates.

This is based on PR #2456, which defined the API.

Discussion

Working with @lahirumaramba and @trekforever.

Testing

Ran npm test and all tests pass.


// Remote Config backend constants
const FIREBASE_REMOTE_CONFIG_V1_API = 'https://firebaseremoteconfig.googleapis.com/v1';
// Honors env param to enable URL override independent of binary change.
const FIREBASE_REMOTE_CONFIG_URL_BASE = process.env.FIREBASE_REMOTE_CONFIG_URL_BASE || 'https://firebaseremoteconfig.googleapis.com';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lahirumaramba I've found it helpful here and in the Web SDK to be able to point the SDK at a local server for testing while in development, and issue reproduction after release. I don't see other references to process.env in this SDK, though. Do you have a preferred way to reference an env var?

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! This makes sense to me. We use process.env to handle other env variables

if (!process.env.STORAGE_EMULATOR_HOST && process.env.FIREBASE_STORAGE_EMULATOR_HOST) {

Let's make a note to document this new env var in our public docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a row to our burndown to document this env var.

Base automatically changed from ssrc-api to ssrc February 14, 2024 19:24
Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!


// Remote Config backend constants
const FIREBASE_REMOTE_CONFIG_V1_API = 'https://firebaseremoteconfig.googleapis.com/v1';
// Honors env param to enable URL override independent of binary change.
const FIREBASE_REMOTE_CONFIG_URL_BASE = process.env.FIREBASE_REMOTE_CONFIG_URL_BASE || 'https://firebaseremoteconfig.googleapis.com';
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! This makes sense to me. We use process.env to handle other env variables

if (!process.env.STORAGE_EMULATOR_HOST && process.env.FIREBASE_STORAGE_EMULATOR_HOST) {

Let's make a note to document this new env var in our public docs

* Interface representing a Remote Config condition in the data-plane.
* A condition targets a specific group of users. A list of these conditions make up
* part of a Remote Config template.
*/
Copy link
Member

Choose a reason for hiding this comment

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

Let's get TW reviews on these. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah. Good point. I was focused on this being an internal client and overlooked that it updated the API. I've added @jenh as a reviewer.

Copy link
Contributor

@jenh jenh left a comment

Choose a reason for hiding this comment

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

LGTM with minor changes.

src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client-internal.ts Outdated Show resolved Hide resolved
@erikeldridge
Copy link
Contributor Author

Thank you for reviewing, @lahirumaramba, @jenh!

@jenh, I've updated the PR with your suggested changes and re-requested review from you.

@erikeldridge erikeldridge merged commit aed5646 into ssrc Feb 20, 2024
5 checks passed
@erikeldridge erikeldridge deleted the ssrc-client-internals branch February 20, 2024 16: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.

None yet

4 participants