-
Notifications
You must be signed in to change notification settings - Fork 2k
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
@uppy/companion: allow customizing express session prefix #4249
Conversation
to make it easier to identify keys coming from companion the default value is just "sess:" which is a bit hard to identify
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 suppose we do also temporarily need the docs in this repo. Otherwise LGTM
Do we really though? It's not a feature I suppose most people will use and we are (soon?) releasing a new website anyways? If we want to keep the existing documentation in sync with the new one, then there's a lot of more things we should backport from there |
So far every time a change has been made in Uppy I made sure to call out it's documented in both, so there shouldn't be a lot more things to backport. I know it's brittle but I think we should temporarily document both if we introduce new things. Website is probably taking at least two more months. If we release notes come out with this change and there are no docs, might be confusing. |
@@ -120,7 +120,8 @@ module.exports = function server (inputCompanionOptions = {}) { | |||
if (companionOptions.redisUrl) { | |||
const RedisStore = connectRedis(session) | |||
const redisClient = redis.client(companionOptions) | |||
sessionOptions.store = new RedisStore({ client: redisClient }) | |||
// todo next major: change default prefix to something like "companion:" | |||
sessionOptions.store = new RedisStore({ client: redisClient, prefix: process.env.COMPANION_REDIS_EXPRESS_SESSION_PREFIX || 'sess:' }) |
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.
What about making the default prefix include companion
? Other people running companion may also get confused what these sess:
things are in their redis without such clues?
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 would also prefer that, thrn we might not even need an option. But I think that would be a breaking change and not sure if we have a major of companion coming up
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.
We have a place for storing Major suggestions right? then I propos we keep this now, but add the reminder there for when the next major does come up?
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 think we usually store them as TODOs in the code (there is already a todo there to change the default)
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.
one q, otherwise LGTM
| Package | Version | Package | Version | | ---------------------- | ------- | ---------------------- | ------- | | @uppy/audio | 1.0.3 | @uppy/locales | 3.0.5 | | @uppy/aws-s3 | 3.0.5 | @uppy/react | 3.1.0 | | @uppy/aws-s3-multipart | 3.1.2 | @uppy/react-native | 0.5.0 | | @uppy/companion | 4.2.0 | @uppy/transloadit | 3.1.0 | | @uppy/core | 3.0.5 | @uppy/utils | 5.1.2 | | @uppy/dashboard | 3.2.1 | uppy | 3.4.0 | - @uppy/utils: better fallbacks for the drag & drop API (Antoine du Hamel / #4260) - @uppy/core: fix metafields validation when used as function (Merlijn Vos / #4276) - @uppy/companion: allow customizing express session prefix (Mikael Finstad / #4249) - meta: Fix comment about COMPANION_PATH (Collin Allen / #4279) - @uppy/companion: Fix typo in KUBERNETES.md (Collin Allen / #4277) - @uppy/locales: update zh_TW.js (5idereal / #4270) - meta: ci: make sure Yarn's global cache is disabled (Antoine du Hamel / #4268) - @uppy/aws-s3-multipart: fix metadata shape (Antoine du Hamel / #4267) - meta: example: add multipart support to `aws-nodejs` (Antoine du Hamel / #4257) - @uppy/react-native: example: revive React Native example (Giacomo Cerquone / #4164) - @uppy/utils: Fix getSpeed type (referenced `bytesTotal` instead of `uploadStarted`) (Pascal Wengerter / #4263) - @uppy/companion: document how to run many instances (Mikael Finstad / #4227) - @uppy/aws-s3-multipart: add support for `allowedMetaFields` option (Antoine du Hamel / #4215) - meta: Fix indentation in generate-test.mjs (Youssef Victor / #4181) - @uppy/react: deprecate `useUppy` (Merlijn Vos / #4223) - meta: fix typo in README.md (Fuad Herac / #4254) - meta: Don’t close stale issues automatically (Artur Paikin / #4246) - meta: upgrade to Vite 4 and ESBuild 0.16 (Antoine du Hamel / #4243) - @uppy/audio: @uppy/audio fix typo in readme (elliotsayes / #4240) - @uppy/aws-s3: fix: add https:// to digital oceans link (Le Gia Hoang / #4165) - website: Simplify Dashboard code sample (Artur Paikin / #4197) - @uppy/transloadit: introduce `assemblyOptions`, deprecate other options (Merlijn Vos / #4059) - @uppy/core: fix typo in Uppy.test.js (Ikko Ashimine / #4235) - @uppy/aws-s3-multipart: fix singPart type (Stefan Schonert / #4224)
…t#4249) * allow customizing express session prefix to make it easier to identify keys coming from companion the default value is just "sess:" which is a bit hard to identify * rename * document COMPANION_REDIS_EXPRESS_SESSION_PREFIX * change todo * Update companion.md * Update companion.md Co-authored-by: Merlijn Vos <[email protected]>
| Package | Version | Package | Version | | ---------------------- | ------- | ---------------------- | ------- | | @uppy/audio | 1.0.3 | @uppy/locales | 3.0.5 | | @uppy/aws-s3 | 3.0.5 | @uppy/react | 3.1.0 | | @uppy/aws-s3-multipart | 3.1.2 | @uppy/react-native | 0.5.0 | | @uppy/companion | 4.2.0 | @uppy/transloadit | 3.1.0 | | @uppy/core | 3.0.5 | @uppy/utils | 5.1.2 | | @uppy/dashboard | 3.2.1 | uppy | 3.4.0 | - @uppy/utils: better fallbacks for the drag & drop API (Antoine du Hamel / transloadit#4260) - @uppy/core: fix metafields validation when used as function (Merlijn Vos / transloadit#4276) - @uppy/companion: allow customizing express session prefix (Mikael Finstad / transloadit#4249) - meta: Fix comment about COMPANION_PATH (Collin Allen / transloadit#4279) - @uppy/companion: Fix typo in KUBERNETES.md (Collin Allen / transloadit#4277) - @uppy/locales: update zh_TW.js (5idereal / transloadit#4270) - meta: ci: make sure Yarn's global cache is disabled (Antoine du Hamel / transloadit#4268) - @uppy/aws-s3-multipart: fix metadata shape (Antoine du Hamel / transloadit#4267) - meta: example: add multipart support to `aws-nodejs` (Antoine du Hamel / transloadit#4257) - @uppy/react-native: example: revive React Native example (Giacomo Cerquone / transloadit#4164) - @uppy/utils: Fix getSpeed type (referenced `bytesTotal` instead of `uploadStarted`) (Pascal Wengerter / transloadit#4263) - @uppy/companion: document how to run many instances (Mikael Finstad / transloadit#4227) - @uppy/aws-s3-multipart: add support for `allowedMetaFields` option (Antoine du Hamel / transloadit#4215) - meta: Fix indentation in generate-test.mjs (Youssef Victor / transloadit#4181) - @uppy/react: deprecate `useUppy` (Merlijn Vos / transloadit#4223) - meta: fix typo in README.md (Fuad Herac / transloadit#4254) - meta: Don’t close stale issues automatically (Artur Paikin / transloadit#4246) - meta: upgrade to Vite 4 and ESBuild 0.16 (Antoine du Hamel / transloadit#4243) - @uppy/audio: @uppy/audio fix typo in readme (elliotsayes / transloadit#4240) - @uppy/aws-s3: fix: add https:// to digital oceans link (Le Gia Hoang / transloadit#4165) - website: Simplify Dashboard code sample (Artur Paikin / transloadit#4197) - @uppy/transloadit: introduce `assemblyOptions`, deprecate other options (Merlijn Vos / transloadit#4059) - @uppy/core: fix typo in Uppy.test.js (Ikko Ashimine / transloadit#4235) - @uppy/aws-s3-multipart: fix singPart type (Stefan Schonert / transloadit#4224)
to make it easier to identify keys coming from companion the default value is just "sess:" which is a bit hard to identify
I will document this in transloadit/uppy.io#5