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

Remote Config Add list versions operation #896

Merged
merged 5 commits into from
Jun 12, 2020

Conversation

lahirumaramba
Copy link
Member

@lahirumaramba lahirumaramba commented May 20, 2020

  • Add list versions operation
  • Add unit tests

NOTE: Integration tests for all the new operations will be added in a separate PR.

@@ -361,7 +480,7 @@ describe('RemoteConfigApiClient', () => {
});
}

function runErrorResponseTests(rcOperation: () => Promise<RemoteConfigTemplate>): void {
function runEtagHeaderTests(rcOperation: () => Promise<RemoteConfigTemplate>): void {
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this function to extract etag header validation tests from runErrorResponseTests function. That way I could re-use runErrorResponseTests for list versions operation. :)

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Implementation looks pretty good, but I did have some comments on the API. I've added the same to the design doc too.

src/index.d.ts Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/index.d.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Looks mostly good. Few areas pointed out for improvement.

src/index.d.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config.ts Outdated Show resolved Hide resolved
test/unit/remote-config/remote-config-api-client.spec.ts Outdated Show resolved Hide resolved
test/unit/remote-config/remote-config.spec.ts Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
Copy link
Member Author

@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.

Thank you! Updated with fixes!

src/index.d.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
src/remote-config/remote-config-api-client.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Looks great. I only had a few nits.

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM 👍

@hiranya911 hiranya911 removed their assignment Jun 11, 2020
@lahirumaramba lahirumaramba merged commit bde53cc into remote-config-vc Jun 12, 2020
@lahirumaramba lahirumaramba deleted the lm-rc-listversions branch June 12, 2020 15:51
lahirumaramba added a commit that referenced this pull request Jun 25, 2020
* Get remote config template by version number (#874)

* Get remote config template by version number

* Refactor unit tests for Remote Config (#884)

* Refactor unit tests

* Add Remote Config Rollback operation (#885)

* Add Remote Config Rollback operation

* Update docs and move etag validation to a helper function

* Update docs

* Introduce a util to create a template from API response

* PR fixes

* Remote Config Add list versions operation (#896)

* Remote Config: Add list versions operation

* Add version Impl and other PR fixes

* PR fixes

* Imrpoved unit tests and some code clean up

* Fix code formatting

* Add a separate function to get a Template with version (#902)

* Add version meta data to RC templates (#906)

* Add version meta data to RC templates

* PR fixes

* Use assertion to unwrap template.version

* Update Remote Config Docstrings in index.d.ts
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

2 participants