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

🐛 Bug Report: Docker containers always try to build enterprise version #5052

Closed
2 tasks done
MasonD opened this issue Jan 6, 2024 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working DevOps Low priority Created by Linear-GitHub Sync security

Comments

@MasonD
Copy link
Contributor

MasonD commented Jan 6, 2024

📜 Description

The dockerfiles use the syntax:

RUN if [ -n '${BULL_MQ_PRO_NPM_TOKEN}' ] ; then echo 'Building with Enterprise Edition of Novu'; rm -f .npmrc ; cp .npmrc-cloud .npmrc ; fi

But since single quotes are used in the if, string interpolation isn't performed, and the literal string '${BULL_MQ_PRO_NPM_TOKEN}' is always non-null. Thus the npmrc swap is always performed.

👟 Reproduction steps

pnpm docker:build without BULL_MQ_PRO_NPM_TOKEN set. Observe the build output echo "Building with Enterprise Edition of Novu"

👍 Expected behavior

It should use double quotes instead of single so it actually works as intended.

It should securely leverage the Bullmq pro token to correctly identify if we are building the community or enterprise edition.

Novu version

0.23.0

npm version

n/a

node version

n/a

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

Yes I am willing to submit a PR! Ping me if it's more convenient for me to make those couple quote changes and submit a PR :)

Copy link

linear bot commented Jan 6, 2024

@github-actions github-actions bot added the triage label Jan 6, 2024
@linear linear bot added security DevOps bug Something isn't working and removed triage labels Jan 22, 2024
@scopsy
Copy link
Contributor

scopsy commented Jan 24, 2024

@MasonD just to make sure that you are willing to help with this? Let me know if otherwise, I can un-assign and we will handle it internally 🙏

@scopsy scopsy added the Low priority Created by Linear-GitHub Sync label Jan 24, 2024
@MasonD
Copy link
Contributor Author

MasonD commented Jan 25, 2024

I'm happy to do this, yeah. I'll have time to tackle it tomorrow if it's not something you're trying to push through asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DevOps Low priority Created by Linear-GitHub Sync security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants