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

LIVE-5319 Bump simple-configuration to 1.5.7 #1184

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

waisingyiu
Copy link
Contributor

@waisingyiu waisingyiu commented Nov 13, 2023

What does this change?

This PR bumps the simple-configuration library to a newer version 1.5.7 from version 1.5.6

There are API breaking changes in simple-configuration between version 1.5.6 and version 1.5.7. Please refer to guardian/mobile-apps-api#2797 for details.

This PR makes the following code changes for this new version of simple-configuration:

  1. In order to detect whether the service is running locally, I added a check on the environment variable "MOBILE_LOCAL_DEV" - if this environment variable is present, it assumes DevIdentity and bypassed the AppIdentity.whoAmI call (bypassing AppIdentity.whoAmI in local deployment was recommended in Discourage usage that causes long startup delays simple-configuration#28). Otherwise it invoked AppIdentity.whoAmI and it is still able to return a DevIdentity if whoAmI fails to load the identity from EC2 tags / lambda environment variables.
  2. Pass in the region to SSMConfigurationLocation constructor
    using the region from AwsIdentity
  3. The simple-configuration library has to be bumped in mobile-logstash-encoder as well (LIVE-5891 Bump simple configuration to 1.5.7 mobile-logstash-encoder#17). Otherwise, the microservice fails to start up because the mobile-logstash-encoder throws fatal exception due to the breaking API change.

How to test

It was deployed to CODE, and we validated the service by registering a token and sending a notification to debug build.

Logs were written properly:





@waisingyiu waisingyiu requested a review from a team as a code owner November 13, 2023 10:04
@waisingyiu waisingyiu changed the title Bump simple-configuration to 1.5.7 LIVE-5319 Bump simple-configuration to 1.5.7 Nov 13, 2023
Copy link
Contributor

@silvacb silvacb left a comment

Choose a reason for hiding this comment

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

👍

@waisingyiu waisingyiu merged commit 28c49d1 into main Nov 13, 2023
1 check passed
@waisingyiu waisingyiu deleted the LIVE-5319-bump-simple-configuration branch November 13, 2023 11:45
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