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

ARSN-224: fix missing default for models imports #1931

Merged
merged 2 commits into from
Jun 10, 2022

Conversation

williamlardier
Copy link
Contributor

@williamlardier williamlardier commented Jun 10, 2022

Fixes this in cloudserver:

{"name":"S3","time":1654855148883,"error":"BackendInfo is not a constructor","stack":"TypeError: BackendInfo is not a constructor\n    at DataWrapper.uploadPartCopy (/usr/src/app/node_modules/arsenal/build/lib/storage/data/DataWrapper.js:376:29)\n    at goGetData (/usr/src/app/lib/api/objectPutCopyPart.js:254:18)\n    at nextTask (/usr/src/app/node_modules/async/dist/async.js:5297:14)\n    at next (/usr/src/app/node_modules/async/dist/async.js:5304:9)\n    at /usr/src/app/node_modules/async/dist/async.js:906:16\n    at /usr/src/app/lib/api/objectPutCopyPart.js:240:32\n    at /usr/src/app/node_modules/arsenal/build/lib/storage/metadata/MetadataWrapper.js:211:20\n    at /usr/src/app/node_modules/arsenal/node_modules/async/dist/async.js:473:16\n    at next (/usr/src/app/node_modules/arsenal/node_modules/async/dist/async.js:5332:29)\n    at /usr/src/app/node_modules/arsenal/node_modules/async/dist/async.js:972:16","level":"fatal","message":"caught error","hostname":"kw013-prod-cloudserver-backend-0-17615-4028","pid":74}

Also make sure the result returned by Arsenal for the Bucket Notification Configuration is consistent with what is expected in Cloudserver tests and what was returned before.

@bert-e
Copy link
Contributor

bert-e commented Jun 10, 2022

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.

@williamlardier williamlardier changed the base branch from development/8.1 to development/7.10 June 10, 2022 10:20
@scality scality deleted a comment from bert-e Jun 10, 2022
@bert-e
Copy link
Contributor

bert-e commented Jun 10, 2022

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/6.4
  • development/7.4

Follow integration pull requests if you would like to be notified of
build statuses by email.

@bert-e
Copy link
Contributor

bert-e commented Jun 10, 2022

Waiting for approval

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

  • the author

  • 2 peers

Copy link

@jbertran jbertran left a comment

Choose a reason for hiding this comment

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

Seems there are a few more missing, not related to your specific issue but they'll crash as well eventually:

❯ git grep 'require.*models.*' lib/storage lib/algos
lib/storage/data/DataWrapper.js:11:const BackendInfo = require('../../models/BackendInfo');
lib/storage/metadata/MetadataWrapper.js:3:const BucketInfo = require('../../models/BucketInfo');
lib/storage/metadata/bucketclient/BucketClientInterface.js:3:const BucketInfo = require('../../../models/BucketInfo');
lib/storage/metadata/file/BucketFileInterface.js:5:const BucketInfo = require('../../../models/BucketInfo');
lib/storage/metadata/mongoclient/MongoClientInterface.js:18:const BucketInfo = require('../../../models/BucketInfo');
lib/storage/metadata/proxy/BucketdRoutes.js:4:const BucketInfo = require('../../../models/BucketInfo');

Reason: we're not migrating storage and algos because they're about to be moved to Armory.

@bert-e
Copy link
Contributor

bert-e commented Jun 10, 2022

Waiting for approval

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

  • the author

  • 2 peers

The following reviewers are expecting changes from the author, or must review again:

@williamlardier
Copy link
Contributor Author

williamlardier commented Jun 10, 2022

Hi @jbertran , are you up to date? Picking randomly a line from your comment, we already have the default import:

const BucketInfo = require('../../models/BucketInfo').default;

Getting this using your command:

lib/storage/data/DataWrapper.js:const BackendInfo = require('../../models/BackendInfo').default;
lib/storage/metadata/MetadataWrapper.js:const BucketInfo = require('../../models/BucketInfo').default;
lib/storage/metadata/bucketclient/BucketClientInterface.js:const BucketInfo = require('../../../models/BucketInfo').default;
lib/storage/metadata/file/BucketFileInterface.js:const BucketInfo = require('../../../models/BucketInfo').default;
lib/storage/metadata/mongoclient/MongoClientInterface.js:const BucketInfo = require('../../../models/BucketInfo').default;
lib/storage/metadata/proxy/BucketdRoutes.js:const BucketInfo = require('../../../models/BucketInfo').default;

@williamlardier williamlardier requested a review from jbertran June 10, 2022 12:01
@williamlardier williamlardier dismissed jbertran’s stale review June 10, 2022 12:01

As discussed in PM, it was because the Arsenal was outdated

@bert-e
Copy link
Contributor

bert-e commented Jun 10, 2022

Waiting for approval

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

  • the author

  • 2 peers

@williamlardier
Copy link
Contributor Author

I am approving this, I got a green build in Cloudserver https://eve.devsca.com/github/scality/cloudserver/#/builders/3/builds/17628

Please let me know or open a ticket if you see more required changes.

@williamlardier
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Jun 10, 2022

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/7.10

  • ✔️ development/8.1

The following branches will NOT be impacted:

  • development/6.4
  • development/7.4

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 Jun 10, 2022

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

  • ✔️ development/7.10

  • ✔️ development/8.1

The following branches have NOT changed:

  • development/6.4
  • development/7.4

Please check the status of the associated issue ARSN-224.

Goodbye williamlardier.

@bert-e bert-e merged commit b744385 into development/7.10 Jun 10, 2022
@bert-e bert-e deleted the bugfix/ARSN-224-fix-models-imports branch June 10, 2022 12:36
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.

5 participants