-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix 'PLUGIN_VERSION' export from 'shared' #1497
base: master
Are you sure you want to change the base?
Fix 'PLUGIN_VERSION' export from 'shared' #1497
Conversation
/lgtm |
/test odf-console-e2e-aws |
1 similar comment
/test odf-console-e2e-aws |
/retest |
@SanjalKatiyar: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
@@ -12,4 +12,4 @@ export const DEFAULT_NS = 'default'; | |||
export const RACK_LABEL = 'topology.rook.io/rack'; | |||
export const NOOBA_EXTERNAL_PG_SECRET_NAME = 'noobaa-external-pg'; | |||
export const NOOBAA_EXTERNAL_PG_TLS_SECRET_NAME = 'noobaa-external-pg-tls'; | |||
export const PLUGIN_VERSION = process.env.PLUGIN_VERSION; | |||
export const PLUGIN_VERSION = process?.env?.PLUGIN_VERSION; |
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.
E2E tests were always failing, so I saw the videos and reproduced locally:
From the MDN docs:
I tested this solution locally and it works:
export const PLUGIN_VERSION = process?.env?.PLUGIN_VERSION; | |
export const PLUGIN_VERSION = typeof process === 'undefined' ? undefined : process?.env?.PLUGIN_VERSION; |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SanjalKatiyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There is no
process
object at runtime, this causes an issue whenshared
is consumed as a library and consumer is not explicitly defining a corresponding value ofprocess.env.PLUGIN_VERSION
during the bundler build.Temporary workaround: if using webpack as a bundler, consumer of the
shared
needs to add: