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

[PS-2367] CLI pkg ref for argon2 lib #4579

Merged
merged 26 commits into from
Jan 27, 2023
Merged

[PS-2367] CLI pkg ref for argon2 lib #4579

merged 26 commits into from
Jan 27, 2023

Conversation

kspearrin
Copy link
Member

@kspearrin kspearrin commented Jan 26, 2023

https://bitwarden.atlassian.net/browse/DEVOPS-1182

Type of change

- [x] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Fix reference to argon2 lib for CLI packaging.

Code changes

  • build-cli.yml: Change to os matrix for building cli and artifacts.
  • apps/cli/package.json: Add argon2 node_modules to assets.

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@kspearrin kspearrin requested a review from a team January 26, 2023 16:57
@kspearrin kspearrin changed the title pkg ref argon2 CLI pkg ref for argon2 lib Jan 26, 2023
@kspearrin kspearrin marked this pull request as ready for review January 26, 2023 16:58
@djsmith85 djsmith85 changed the title CLI pkg ref for argon2 lib [PS-2367] CLI pkg ref for argon2 lib Jan 26, 2023
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency should be added to the package.json in apps/cli. Pkg should figure it out from there.

@kspearrin
Copy link
Member Author

kspearrin commented Jan 26, 2023

@Hinton I made the change, but it doesn't appear to work in my tests.
image

@Hinton
Copy link
Member

Hinton commented Jan 26, 2023

@kspearrin that's odd. I did test it locally but I forgot to move the executable and after moving I get the same error. According to the docs it should pick it up https://github.com/vercel/pkg#native-addons.

Maybe we need the assets but I was certain we had other native dependencies so it feels a bit odd needing an exception for this package. We'll want to make certain the correct node is distributed in each build.

We do still need the argon2 in the package.json as a dependency though for the npm installs to pick it up.

@kspearrin
Copy link
Member Author

kspearrin commented Jan 26, 2023

Should be good to go now @Hinton. @bitwarden/dept-devops is exploring what we need to do to support the argon2.node binary on different OSs during the CI build.

@kspearrin kspearrin requested a review from Hinton January 26, 2023 19:53
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package changes looks good. I'll let devops review the workflow changes.

@kspearrin kspearrin merged commit 61d94c7 into master Jan 27, 2023
@kspearrin kspearrin deleted the argonclifix branch January 27, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants