Skip to content

fix: rename Segment env vars and add in example file#8059

Merged
NicolasMassart merged 1 commit into
feat/batch_1129_segmentfrom
fix/7520_segment_env_vars
Dec 11, 2023
Merged

fix: rename Segment env vars and add in example file#8059
NicolasMassart merged 1 commit into
feat/batch_1129_segmentfrom
fix/7520_segment_env_vars

Conversation

@NicolasMassart

@NicolasMassart NicolasMassart commented Dec 8, 2023

Copy link
Copy Markdown
Contributor

Description

  1. What is the reason for the change?
  • Segment env vars include dev or prod in the name: the name should always be the same.
  • Segment env vars are not in the env example file
  1. What is the improvement/solution?
  • rename Segment env vars:
    • SEGMENT_WRITE_KEY
    • SEGMENT_PROXY_URL
  • add env var placeholders in example file

Related issues

Fixes missing variables naming change in https://github.com/MetaMask/mobile-planning/issues/1222

Manual testing steps

  1. run the app without Segment variables in .js.env -> should not break the app, just the following in logs:
WARN  An internal error occurred:  [Error]
WARN  Could not receive settings from Segment. Device mode destinations will be ignored unless you specify default settings in the client config.
  1. add the two variables in .js.env with empty "" values.-> should not break the app, just the following in logs:
WARN  An internal error occurred:  [Error]
WARN  Could not receive settings from Segment. Device mode destinations will be ignored unless you specify default settings in the client config.
  1. add the two variables in .js.env with correct values -> should work, and have the info in logs:
 INFO  Received settings from Segment succesfully.

Screenshots/Recordings

Before

NA

After

NA

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

and add in example file
@github-actions

github-actions Bot commented Dec 8, 2023

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@NicolasMassart NicolasMassart added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-client labels Dec 8, 2023
@NicolasMassart NicolasMassart self-assigned this Dec 8, 2023
@NicolasMassart NicolasMassart marked this pull request as ready for review December 8, 2023 23:19
@NicolasMassart NicolasMassart requested a review from a team as a code owner December 8, 2023 23:19
@github-actions

github-actions Bot commented Dec 8, 2023

Copy link
Copy Markdown
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/efd80abd-a017-4efe-be1c-bef496b541e0
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (feat/batch_1129_segment@726fd80). Click here to learn what that means.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             feat/batch_1129_segment    #8059   +/-   ##
==========================================================
  Coverage                           ?   37.23%           
==========================================================
  Files                              ?     1142           
  Lines                              ?    29283           
  Branches                           ?     2759           
==========================================================
  Hits                               ?    10904           
  Misses                             ?    17751           
  Partials                           ?      628           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarqubecloud

sonarqubecloud Bot commented Dec 8, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@NicolasMassart NicolasMassart added No QA Needed Apply this label when your PR does not need any QA effort. and removed Run Smoke E2E labels Dec 9, 2023

@tommasini tommasini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@NicolasMassart NicolasMassart merged commit 92c5dc9 into feat/batch_1129_segment Dec 11, 2023
@NicolasMassart NicolasMassart deleted the fix/7520_segment_env_vars branch December 11, 2023 15:37
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 11, 2023
@github-actions github-actions Bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 11, 2023
@gauthierpetetin gauthierpetetin added the team-mobile-platform Mobile Platform team label Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants