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

Improvement/vltclt 37 remove arsenal dep #431

Merged
merged 5 commits into from
Jan 24, 2024

Conversation

williamlardier
Copy link
Contributor

@williamlardier williamlardier commented Jan 17, 2024

Remove arsenal from the prod dependencies, as it is only used to check errors (internal error, mostly), that can be stored as a const.
The main advantage being the decrease of the build duration, arsenal requires to build multiple modules, taking up to 5~10min every time in some CIs, depending on the load.

@bert-e
Copy link
Contributor

bert-e commented Jan 17, 2024

Hello williamlardier,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Jan 17, 2024

Incorrect fix version

The Fix Version/s in issue VLTCLT-37 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 8.3.16

Please check the Fix Version/s of VLTCLT-37, or the target
branch of this pull request.

@williamlardier williamlardier force-pushed the improvement/VLTCLT-37-remove-arsenal-dep branch from f112cf1 to 95d8bc1 Compare January 17, 2024 14:46
package.json Outdated
@@ -14,13 +14,15 @@
},
"homepage": "https://github.com/scality/vaultclient#readme",
"dependencies": {
"arsenal": "git+https://github.com/scality/Arsenal#8.1.91",
"@aws-crypto/sha256-universal": "^2.0.1",
"@aws-sdk/signature-v4": "^3.130.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

NPM is indicating that this package has been moved to @smithy/signature-v4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here: 9fe22ac

lib/IAMClient.js Outdated
@@ -1014,7 +1021,7 @@ class VaultClient {
* @param {string} [contentType] - content type of body
* @returns {undefined}
*/
request(method, path, iamAuthenticate, callback, data, reqUid,
async request(method, path, iamAuthenticate, callback, data, reqUid,
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding the async tag changes the return to a Promise, which in the case of signer.sign throwing would result in a UnhandlePromiseRejection and crash the process.

I'd suggest adding a _signRequest helper that is async and then using then and catch in request.
Something like:

async _signRequest(iamAuthenticate, req, options) 

That could then be used in request like

this._signRequest(iamAuthenticate, req, options)
    .catch(callback)
    .then(() => {
          ...
    });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The helper was created, and the logic structure was reworked a bit to keep a flat function:
1ce5626

@williamlardier williamlardier force-pushed the improvement/VLTCLT-37-remove-arsenal-dep branch 3 times, most recently from 91fe508 to b522e29 Compare January 23, 2024 08:33
Copy link

@KazToozs KazToozs left a comment

Choose a reason for hiding this comment

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

lgtm

@bert-e
Copy link
Contributor

bert-e commented Jan 23, 2024

Incorrect fix version

The Fix Version/s in issue VLTCLT-37 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 8.3.17

Please check the Fix Version/s of VLTCLT-37, or the target
branch of this pull request.

@williamlardier williamlardier force-pushed the improvement/VLTCLT-37-remove-arsenal-dep branch from b522e29 to cdc9133 Compare January 24, 2024 14:01
@bert-e
Copy link
Contributor

bert-e commented Jan 24, 2024

Incorrect fix version

The Fix Version/s in issue VLTCLT-37 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 8.3.18

Please check the Fix Version/s of VLTCLT-37, or the target
branch of this pull request.

@williamlardier williamlardier force-pushed the improvement/VLTCLT-37-remove-arsenal-dep branch from cdc9133 to 06083cb Compare January 24, 2024 14:10
@bert-e
Copy link
Contributor

bert-e commented Jan 24, 2024

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@williamlardier williamlardier force-pushed the improvement/VLTCLT-37-remove-arsenal-dep branch from 06083cb to 676a2a6 Compare January 24, 2024 14:17
@williamlardier
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Jan 24, 2024

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/8.3

The following branches will NOT be impacted:

  • development/6.4
  • development/7.10
  • development/7.4
  • development/8.2

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Jan 24, 2024

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/8.3

The following branches have NOT changed:

  • development/6.4
  • development/7.10
  • development/7.4
  • development/8.2

Please check the status of the associated issue VLTCLT-37.

Goodbye williamlardier.

@bert-e bert-e merged commit 676a2a6 into development/8.3 Jan 24, 2024
3 checks passed
@bert-e bert-e deleted the improvement/VLTCLT-37-remove-arsenal-dep branch January 24, 2024 14:23
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