Repository navigation
[HOLD] Get Pusher dev suffix from _config.local.php file (Expensify employees only) & append to pusher channel names - #8727
Beamanator wants to merge 4 commits into
Conversation
|
Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work? |
_config.local.php file (Expensify employees only) & append to pusher channel names_config.local.php file (Expensify employees only) & append to pusher channel names
_config.local.php file (Expensify employees only) & append to pusher channel names_config.local.php file (Expensify employees only) & append to pusher channel names
|
Arggg in iOS I'm getting a weird error, seems explained in this article: https://support.pusher.com/hc/en-us/articles/4412490907921-Why-Am-I-Receiving-The-Invalid-signature-Expected-HMAC-SHA256-Error-#:~:text=in%20this%20section-,Why%20Am%20I%20Receiving%20The%20%22Invalid,%3A%20Expected%20HMAC%20SHA256%22%20Error%3F&text=This%20error%20comes%20from%20Pusher's,signature%20from%20your%20auth%20endpoint. I believe the cause is not being able to read the pusher dev suffix properly, since I'm seeing this in the metro logs:
|
| ), | ||
| __REACT_WEB_CONFIG__: JSON.stringify({ | ||
| ...dotenv.config({path: envFile}).parsed, | ||
| pusherSuffix, |
There was a problem hiding this comment.
This doesn't seem to work for iOS, maybe for Android too (maybe a React Native thing) - going to ask for help in #expensify-open-source
There was a problem hiding this comment.
Beamanator
left a comment
There was a problem hiding this comment.
Asking for help :D
| ), | ||
| __REACT_WEB_CONFIG__: JSON.stringify({ | ||
| ...dotenv.config({path: envFile}).parsed, | ||
| pusherSuffix, |
There was a problem hiding this comment.
_config.local.php file (Expensify employees only) & append to pusher channel names_config.local.php file (Expensify employees only) & append to pusher channel names
|
Most likely this will be replaced by #8796 |
Holding on pusher suffix being generated in VMs here: https://github.com/Expensify/Expensify/issues/207388Needs to be tested in combination with Web-E changes I believe 🤔
Details
Part of bigger Offline First - Pusher Changes design doc.
The reason we need to start doing this is b/c in the near future Pusher will handle some API responses, and we don't want one response to take effect on multiple engineers' local environments. Hence we're appending a unique string (the pusher suffix) to the end of pusher channels to keep things from crossing over
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/207393
Tests
To prepare for testing these changes:
There's 2 types of channels being modified. Here they are and here's how to test each:
private-user-accountID-${accountID}${CONFIG.PUSHER.SUFFIX}public-report-reportID-${reportID}${CONFIG.PUSHER.SUFFIX}PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
Please follow the same steps as above