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

Pass "production" as vpn payment env value in prod env #17244

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Feb 16, 2023

Resolves brave/brave-browser#28554

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

BraveVPNUtilsUnitTest.VPNPaymentsEnv

  1. Enable vpn feature and set purchased state
  2. Relaunch with --enable-logging=stderr --vmodule=*vpn*=2
  3. Connect vpn and check below log (including production) is printed
    brave_vpn_os_connection_api_base.cc(401)] ParseAndCacheHostnames : request profile credential:production
  4. Above log(step at 3) can be shown again whenever connecting to another region

@simonhong simonhong self-assigned this Feb 16, 2023
@simonhong simonhong marked this pull request as ready for review February 16, 2023 06:28
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

LGTM ++

@bsclifton
Copy link
Member

NOTE: when merging, we'll want to uplift to 1.49

@stephendonner
Copy link
Contributor

stephendonner commented Feb 19, 2023

Verified PASSED using

Brave 1.50.47 Chromium: 110.0.5481.104 (Official Build) nightly (64-bit)
Revision 46de4a7f41979e829b430bc1ee30ef483aa227ac-refs/branch-heads/5481_77@{#19}
OS Windows 10 Version 22H2 (Build 19045.2604)

Steps:

  1. installed 1.50.47
  2. launched Brave using brave.exe --enable-logging=stderr --vmodule=*vpn*=2
  3. enabled VPN via brave://flags
  4. restarted Brave
  5. purchased, configured, and connected to Brave VPN
  6. switched server regions
  7. examined the logs

Confirmed:

[6484:8524:0218/185303.845:VERBOSE2:brave_vpn_os_connection_api_base.cc(401)] ParseAndCacheHostnames : request profile credential:production [6484:8524:0218/185304.401:VERBOSE2:brave_vpn_os_connection_api_base.cc(423)] OnGetProfileCredentials : received profile credential

Full logs below:

[6484:8524:0218/185250.495:VERBOSE2:brave_vpn_service.cc(554)] GetPurchasedState : PURCHASED
[6484:8524:0218/185250.520:VERBOSE2:brave_vpn_service.cc(579)] LoadPurchasedState: Set as a purchased user as we have valid subscriber credentials & region data
[6484:8524:0218/185250.566:VERBOSE2:brave_vpn_service.cc(187)] GetConnectionState : CONNECTED
[6484:8524:0218/185250.566:VERBOSE2:brave_vpn_service.cc(404)] GetSelectedRegion
[6484:8524:0218/185257.550:VERBOSE2:brave_vpn_os_connection_api_base.cc(136)] Disconnect : start disconnecting!
[6484:8524:0218/185257.550:VERBOSE2:brave_vpn_os_connection_api_base.cc(286)] UpdateAndNotifyConnectionStateChange : changing from CONNECTED to DISCONNECTING
[6484:8524:0218/185257.551:VERBOSE2:brave_vpn_service.cc(136)] OnConnectionStateChanged DISCONNECTING
[6484:8524:0218/185257.677:VERBOSE2:brave_vpn_os_connection_api_base.cc(286)] UpdateAndNotifyConnectionStateChange : changing from DISCONNECTING to DISCONNECTED
[6484:8524:0218/185257.678:VERBOSE2:brave_vpn_service.cc(136)] OnConnectionStateChanged DISCONNECTED
[6484:8524:0218/185300.122:VERBOSE2:brave_vpn_os_connection_api_base.cc(255)] OnNetworkChanged : 6
[6484:8524:0218/185300.122:VERBOSE2:brave_vpn_os_connection_api_base.cc(255)] OnNetworkChanged : 2
[6484:8524:0218/185303.249:VERBOSE2:brave_vpn_service.cc(433)] SetSelectedRegion : Japan
[6484:8524:0218/185303.249:VERBOSE2:brave_vpn_os_connection_api_base.cc(170)] ResetConnectionInfo
[6484:8524:0218/185303.250:VERBOSE2:brave_vpn_os_connection_api_base.cc(102)] Connect : start connecting!
[6484:8524:0218/185303.250:VERBOSE2:brave_vpn_os_connection_api_base.cc(286)] UpdateAndNotifyConnectionStateChange : changing from DISCONNECTED to CONNECTING
[6484:8524:0218/185303.250:VERBOSE2:brave_vpn_service.cc(136)] OnConnectionStateChanged CONNECTING
[6484:8524:0218/185303.250:VERBOSE2:brave_vpn_os_connection_api_base.cc(331)] FetchHostnamesForRegion
[6484:8524:0218/185303.845:VERBOSE2:brave_vpn_os_connection_api_base.cc(353)] OnFetchHostnames
[6484:8524:0218/185303.845:VERBOSE2:brave_vpn_os_connection_api_base.cc(391)] ParseAndCacheHostnames : Picked tokyo-1.sgw.guardianapp.com, Tokyo, Japan, 0, 0
[6484:8524:0218/185303.845:VERBOSE2:brave_vpn_os_connection_api_base.cc(401)] ParseAndCacheHostnames : request profile credential:production
[6484:8524:0218/185304.401:VERBOSE2:brave_vpn_os_connection_api_base.cc(423)] OnGetProfileCredentials : received profile credential
[6484:8524:0218/185304.422:VERBOSE2:brave_vpn_os_connection_api_base.cc(179)] OnCreated
[6484:8524:0218/185305.431:VERBOSE2:brave_vpn_os_connection_api_base.cc(202)] OnConnected
[6484:8524:0218/185305.432:VERBOSE2:brave_vpn_os_connection_api_base.cc(286)] UpdateAndNotifyConnectionStateChange : changing from CONNECTING to CONNECTED
[6484:8524:0218/185305.432:VERBOSE2:brave_vpn_service.cc(136)] OnConnectionStateChanged CONNECTED

kjozwiak pushed a commit that referenced this pull request Feb 28, 2023
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.

Brave-Payments-Environment should send production instead of empty string
3 participants