-
Notifications
You must be signed in to change notification settings - Fork 111
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
[C-3510] Move mobile env from system config to ts env #6935
Conversation
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
688750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.dev | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.stage | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.stage.ts | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.dev.ts | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.dev | View secret |
688750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.dev | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.dev.ts | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.stage.ts | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.prod.ts | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.dev.ts | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.dev | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.prod.ts | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.stage | View secret |
688750 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.stage.ts | View secret |
1606949 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
1606949 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
1606949 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
1606949 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
1606949 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.prod.ts | View secret |
2111319 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
2111319 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
2111319 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
2111319 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
2111319 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.prod.ts | View secret |
2111319 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
2111319 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.prod.ts | View secret |
2111320 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2111320 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2111320 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.stage | View secret |
2111320 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.stage.ts | View secret |
2111320 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.stage | View secret |
2111320 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.stage.ts | View secret |
2111320 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.stage.ts | View secret |
2416684 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.stage.ts | View secret |
2416684 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2416684 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.stage | View secret |
2416684 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.stage.ts | View secret |
2416684 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.stage | View secret |
2416684 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.stage.ts | View secret |
2416685 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.stage | View secret |
2416685 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.stage.ts | View secret |
2416685 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2416685 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.stage.ts | View secret |
2416685 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.stage | View secret |
2416686 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.stage | View secret |
2416686 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.stage.ts | View secret |
2416686 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2416686 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.stage | View secret |
2416686 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.stage.ts | View secret |
2460749 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
2460749 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
2460749 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
2460749 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
2460749 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.prod.ts | View secret |
2460749 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.prod.ts | View secret |
2460750 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
2460750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
2460750 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
2460750 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
2460750 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.prod.ts | View secret |
2460751 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
2460751 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
2460751 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
2460751 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.prod.ts | View secret |
2460751 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
2858198 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.prod.ts | View secret |
2858198 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.prod | View secret |
2858198 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.prod | View secret |
2858198 | Generic High Entropy Secret | a035cce | packages/web/.env/.env.prod | View secret |
2858198 | Generic High Entropy Secret | a035cce | packages/web/src/services/env/env.prod.ts | View secret |
2858198 | Generic High Entropy Secret | a035cce | packages/mobile/src/env/env.prod.ts | View secret |
2858199 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2858199 | Generic High Entropy Secret | 02f0df3 | packages/web/.env/.env.stage | View secret |
2858199 | Generic High Entropy Secret | 02f0df3 | packages/mobile/.env.stage | View secret |
2858199 | Generic High Entropy Secret | 02f0df3 | packages/mobile/src/env/env.stage.ts | View secret |
and 12 others.
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype |
Preview this change https://demo.audius.co/rj-c-3510 |
I'll make the change to just make sure every env var is well defined and drop the "!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@@ -1,6 +1,6 @@ | |||
import { makeGetStorageNodeSelector } from '@audius/common' | |||
|
|||
import { env } from '../env' | |||
import { env } from '../../env' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably just auto import but let's prefer app/env
@raymondjacobson what's the plan with this? should we close? the conflict list is large 😳 |
oof. i forgot :/ ill rebase this PR today |
9825bfd
to
02f0df3
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype |
Hey @rickyrombo @sliptype if i could get re-review that'd be great.
Also found quite a number of random inconsistencies, missing vars, etc. etc., so the types really help. Figured if we were doing mobile, should do web too. To test I've run
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot! Much better type representation
I see that you updated/fixed a lot of the env values for web, but are we actually using the new Env
type there? Maybe I missed it. Essentially I'm wondering if we should switch to an object representation of env vars on web too
Ugh sorry, I didn't even push up the last change 🤦 |
It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype |
Preview this change https://demo.audius.co/rj-c-3510 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Love that we don't have VITE_
littering the codebase anymore
GENERATE_SOURCEMAP=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it not possible to put these in the env object too? Should be able to reference it from vite.config.ts
I would think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me grab you to chat about this tmw. Merging PR, but will open a subsequent one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah let's chat today! I think we missed updating the env vars in index.html
too https://github.com/AudiusProject/audius-protocol/blob/main/packages/web/index.html#L167
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff
@@ -24,9 +26,7 @@ export function createAudiusTrpcClient(currentUserId: number | null) { | |||
// since tRPC server is deployed manually atm. | |||
// in the future some tRPC middleware can set host to currently selected DN per request | |||
function getTrpcEndpoint() { | |||
if (process.env.VITE_TRPC_ENDPOINT) return process.env.VITE_TRPC_ENDPOINT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We should change the below logic to use a env.TRPC_ENDPOINT
instead imo, even if it's temporary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype |
Preview this change https://demo.audius.co/rj-c-3510 |
…xing * origin/main: (37 commits) [DVRL-3] optimize image assets (#7238) PROTO-1607: healthz rm GA dependency (#7264) [C-3696] Fix lineups and recommendations (#7263) Revert "[C-3510] Move mobile env from system config to ts env (#6935)" (#7268) Make ddex tRPC Dockerfile run (#7261) Attempt to circumvent docker-compose regression (#7266) Bump version to 0.6.20 qm sync: handle non-200 status, more tests. (#7265) [PAY-2367] Add migration to repair tips (#7252) [C-3510] Move mobile env from system config to ts env (#6935) v1.5.63 [C-3651] Add box-shadow to text-input (#7259) Remove track player patch (#7256) [C-3633] Fix upload tags (#7246) [PAY-2362] Allow offline download (#7253) Re-add download buttons to mobile track page (#7254) Add auto upgrade logs to vector (#7251) Update styles to wrap properly (#7248) [PROTO-1598] Use tRPC in ddex (#7150) Qm sync (#7250) ...
[a15e3d8] [PAY-2400] Break CoinflowWithdrawModal out into its own modal (#7357) Marcus Pasell [f4fe982] Limit query length in verbose check (#7360) Raymond Jacobson [949cdd2] [INF-650] Fix PublicSite history bug (#7356) Sebastian Klingler [b0ce935] Run docker prune synchronously at the end of jobs (#7355) Danny [0860c5d] [PAY-2401] Update button/copy of withdrawal (#7351) Raymond Jacobson [bf769ec] [PAY-40] Make Rewards Modal Scrollable (#7353) Marcus Pasell [5b0c364] Bump version to 0.6.24 audius-infra [e693ef6] Use rendezvous when gossiping ops (#7354) Steve Perkins [5dc8965] Fix redis hoisting in relay (#7349) Theo Ilie [f1359a9] Update pg_restore to v15 (#7346) Theo Ilie [07bab83] [C-3729] Move top genre query to use aggregates (#7342) Raymond Jacobson [8d7720e] Fix docker push-ddex (#7347) Michelle Brier [c38f442] [C-3728] Add dominant genre support to aggregate_user (#7340) Raymond Jacobson [0513090] Fix sign up rate-limiting issues (#7344) Dylan Jeffers [1bcc737] Don't prune most recent images (#7337) Danny [0cad4ed] [PAY-2354] Specify quality during track download (#7341) Reed [e73e441] DDEX cleanup and remove unused dependencies (#7339) Michelle Brier [610fd56] [C-3641] Clear sign up data on log out (#7338) JD Francis [4f27e83] [INF-571] Add sentry logging to SSR worker (#7331) Sebastian Klingler [808b195] [PAY-2386] Block add to playlist for library on stream gated (#7299) Raymond Jacobson [8a38728] [C-3234] Update today date to include time so that tracks uploaded on the same day don't mix (#7335) Kyle Shanks [e467583] Add mongoDB to ddex webapp (#7330) Michelle Brier [bd56e2b] Remove GA from protodash build process (#7334) Theo Ilie [0bdf871] Fix staging web deploy (#7332) Sebastian Klingler [e19666f] SSR Follow ups (#7318) Sebastian Klingler [3540e14] Merge "Link SP to Audius Profile" feature branch to main (#7298) nicoback2 [c49b8fc] Bump version to 0.6.23 audius-infra [138ed9b] TCR Updates: cron and db init (#7324) alecsavvy [318acec] PROTO-1580: use redis to store aao state and allow initial relay (#7310) alecsavvy [69299ad] Fix Attestations (again) (#7329) Marcus Pasell [7d11bd8] Hide audio onramp when all supported providers are not allowed (#7302) Raymond Jacobson [83efcbe] Misc New Sign Up Select Artist fixes (#7325) JD Francis [88b6c6a] [PAY-2238] Improve balance display with recovery process (#7322) Randy Schott [8e53a7f] Fix sign up saga bug on native (#7323) JD Francis [27f6438] Fix existing discovery attestations (#7320) Marcus Pasell [692f60a] Update cash copy (#7321) Raymond Jacobson [c00fad8] Build openresty image on release (#7319) Theo Ilie [7b53f91]⚠️ [INF-547] SSR Track Page (#7213) Sebastian Klingler [d557552] Change redis DN key (#7317) Theo Ilie [1329083] [QA-733] Dedupe albums and playlists on profile (#7316) Andrew Mendelsohn [dcc2f61] [PAY-2394][PAY-2391][PAY-2393] Address misc coinflow withdrawal ux (#7312) Raymond Jacobson [6005824] Fix payment router recovery indexing using wrong address for comparison (#7314) Randy Schott [d58ac8f] Prune the docker cache more frequently (#7315) Danny [19ea929] Fix hash routing check in index.html (#7297) Raymond Jacobson [6b31794] Fix all caps metric name (#7313) JD Francis [562b388] [C-3668] Improve artist previews (#7308) Dylan Jeffers [87803d7] [C-3722] Fix scrolling on create login details page (#7311) JD Francis [0f96753] [PAY-2376] Stems & Downloads section UI visibility according to access (#7275) Reed [e732d23] [PAY-2372] Web summary table header clickable (#7293) Reed [d3c5f17] add timeout to ga for faster healthz response (#7296) alecsavvy [e8707b8] [C-3667] Improve preview hint, remove duplicate navigation (#7307) Dylan Jeffers [e7863e0] [C-3702 C-3672] Fix sign-up cover-photo issues (#7301) Dylan Jeffers [ad279c9] [PAY-2389] Perform recoveries via payment router to allow indexing (#7306) Randy Schott [3b997ca] Bump version to 0.6.22 audius-infra [0f9430c] Increase crudr sweep interval, add caching. (#7292) Steve Perkins [439f10b] Add ChallengesApi, RewardManager to SDK (#7026) Marcus Pasell [3f55d5d] [C-3718] Fix follow-artist metrics (#7305) Dylan Jeffers [66bd8ab] [C-3712, C-3719] Fix loading of suggested tracks (#7303) Andrew Mendelsohn [79bd9bc] [C-3697, C-3713, C-3714] Copy updates; add missing overflow menu items (#7304) Andrew Mendelsohn [8211796] Remove download progress on ios (#7300) Reed [8c1293d] [C-3575] Moar sign up metrics (#7288) JD Francis [17f3a6c] [Web][Libs] QA for Link Audius Profile to Dashboard Wallet feature [C-3683] [C-3686] (#7283) nicoback2 [236f571] Fix logged out state track access (#7291) Saliou Diallo [e78dfb9] Fix logged out state track access on client (#7295) Saliou Diallo [e87fd07] [PAY-2327] Add stem upload row (#7277) Saliou Diallo [8e9c243] [C-3703] Reroute away from signup if user already has 3 followees (#7294) JD Francis [9cd65c6] Re-land #2 of ts env (#7290) Raymond Jacobson [d9300bf] [C-3710] Continuous playback (#7278) Dylan Jeffers [460c381] [C-3707] Remove text-input font scale (#7280) Dylan Jeffers [f401fb3] [C-3716] Update sign up recovery flow for new sign up (#7289) Kyle Shanks [f118aeb] [PAY-2368] Add lockAmount flag to web withdrawals (#7286) Randy Schott [4b87ece] [C-3679] Filter out unowned collections from add modal and drawer (#7244) Andrew Mendelsohn [2245cb9] [PAY-2375] Tag @audius in purchase tweets (#7274) Reed [3887389] Revert "[C-3510] Re-land typescript env changes (#7272)" (#7287) Raymond Jacobson [00ca201] use abis within healthz (#7276) alecsavvy [c75590f] Bump version to 0.6.21 audius-infra [1023c8d] Updates deprecated vscode settings (#7273) Randy Schott [1730644] [PAY-2238][PAY-2242][PAY-2248] Adds more robust payment router indexing support (#7249) Randy Schott [e147d2e] [C-3510] Re-land typescript env changes (#7272) Raymond Jacobson [4e1b7fe] Fix mobile track pages due to collection check (#7285) Dylan Jeffers [582c37d] DDEX standalone node (#7281) Michelle Brier [568d677] Misc Sign Up QA Fixes (#7260) JD Francis [85061bd] [C-3699, C-3700] Edit albums on mobile (#7270) Andrew Mendelsohn [0e88152] Use defaults for trending track checks (#7279) Theo Ilie [20f9ebd] [C-3689] Fix follow artists not happening if you wait too long on sign up (web) (#7257) JD Francis [a8cca23] Fix desktop track tile title width (#7269) Dylan Jeffers [81e8c8a] [DVRL-3] optimize image assets (#7238) Sam Gutentag [df20e33] PROTO-1607: healthz rm GA dependency (#7264) alecsavvy [fd8929e] [C-3696] Fix lineups and recommendations (#7263) Dylan Jeffers [bbad3fe] Revert "[C-3510] Move mobile env from system config to ts env (#6935)" (#7268) Raymond Jacobson [ac119fe] Make ddex tRPC Dockerfile run (#7261) Theo Ilie [87f81b6] Attempt to circumvent docker-compose regression (#7266) Danny [b48855b] Bump version to 0.6.20 audius-infra [739ddf8] qm sync: handle non-200 status, more tests. (#7265) Steve Perkins [64e38bc] [PAY-2367] Add migration to repair tips (#7252) Raymond Jacobson [1ebec24] [C-3510] Move mobile env from system config to ts env (#6935) Raymond Jacobson
Description
ENVIRONMENT
(already in there) to pick ats
env file to use throughout runtimeNew changes:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.