-
Notifications
You must be signed in to change notification settings - Fork 19
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
bugfix: S3C-2987 helper to get stream data as a JSON payload #1126
bugfix: S3C-2987 helper to get stream data as a JSON payload #1126
Conversation
Hello jonathan-gramain,My role is to assist you with the merge of this Status report is not available. |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.1/bugfix/S3C-2987-helperForJsonStreamParsing origin/development/8.1
$ git merge origin/w/7.8/bugfix/S3C-2987-helperForJsonStreamParsing
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.1/bugfix/S3C-2987-helperForJsonStreamParsing |
lib/stream/utils.js
Outdated
const contents = contentsChunks.join(''); | ||
try { | ||
const parsedContents = JSON.parse(contents); | ||
let validatedContents; |
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.
Could just resolve(value) and resolve(parsedContents) instead of creating this variable. Doesn't matter though, either way.
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.
One thing I suggest is instead of utils holding a couple of stream methods, export each method directly with its own file.
Instead of
- lib/stream/utils.js
module.exports = {
readJSONStreamObject,
};
use
+lib/stream/readJSONStreamObject.js
module.exports = readJSONStreamObject;
It's easy to discover and use the methods this way.
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
Follow integration pull requests if you would like to be notified of |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include a mandatory approval from @jonathan-gramain. |
c433d75
to
aaa91b6
Compare
History mismatchMerge commit #c433d758b418f35bbf6ec63e143d670d8d9835ae on the integration branch It is likely due to a rebase of the branch Please use the |
@bert-e reset |
Reset completeI have successfully deleted this pull request's integration branches. |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.1/bugfix/S3C-2987-helperForJsonStreamParsing origin/development/8.1
$ git merge origin/w/7.8/bugfix/S3C-2987-helperForJsonStreamParsing
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.1/bugfix/S3C-2987-helperForJsonStreamParsing |
Add a new helper function to get data from a stream as a JSON payload, optionally validated against a joi schema. Note: uses async/await, so updated the scality/Guidelines dependency to please the linter
aaa91b6
to
3d064b9
Compare
History mismatchMerge commit #aaa91b659a547bdf187e90f34dc26ca5f4c149f3 on the integration branch It is likely due to a rebase of the branch Please use the |
@bert-e reset |
Reset completeI have successfully deleted this pull request's integration branches. |
ConflictA conflict has been raised during the creation of I have not created the integration branch. Here are the steps to resolve this conflict: $ git fetch
$ git checkout -B w/8.1/bugfix/S3C-2987-helperForJsonStreamParsing origin/development/8.1
$ git merge origin/w/7.8/bugfix/S3C-2987-helperForJsonStreamParsing
$ # <intense conflict resolution>
$ git commit
$ git push -u origin w/8.1/bugfix/S3C-2987-helperForJsonStreamParsing |
An alternative is a flat structure used by standard packages like python, go, or node. Most imports require no more than one path. Even if the files are split up using index.js to manipulate and simplify the imports can be convenient. Very different from super nested structures from Java and C++ ( I think ). |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
Follow integration pull requests if you would like to be notified of |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include a mandatory approval from @jonathan-gramain. |
@bert-e approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue S3C-2987. Goodbye jonathan-gramain. |
Add a new helper function to get data from a stream as a JSON payload,
optionally validated against a joi schema.
Note: uses async/await, so updated the scality/Guidelines dependency
to please the linter