-
Notifications
You must be signed in to change notification settings - Fork 3
Improvement/s3 utils 171 bump deps #336
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| ARG NODE_VERSION=16.20.2-bullseye-slim | ||
| ARG NODE_VERSION=22.15.0-bookworm-slim | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At the moment, the image includes python, for the scripts in the With the upgrade, a newer version of python will be used: so we need to check that the scripts still work (or find a way to remove them and drop python from the image, i.e. move forward with s3utils-172...)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is now |
||
| # Use separate builder to retrieve & build node modules | ||
| FROM node:${NODE_VERSION} AS builder | ||
|
|
@@ -34,6 +34,7 @@ RUN apt-get update && \ | |
| jq \ | ||
| python3 \ | ||
| python3-pip \ | ||
| python3-venv \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| ENV BALLOT_VERSION 1.0.4 | ||
|
|
@@ -48,6 +49,8 @@ COPY --from=builder /usr/src/app/supervisord /usr/local/bin/ | |
| ENV NO_PROXY localhost,127.0.0.1 | ||
| ENV no_proxy localhost,127.0.0.1 | ||
|
|
||
| RUN python3 -m venv /opt/venv | ||
| ENV PATH="/opt/venv/bin:$PATH" | ||
| RUN pip install -r utapi/requirements.txt | ||
|
|
||
| ## This section duplicates S3C Federation Dockerfile, this needs to be refactored | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,9 @@ class StalledRequestHandler { | |
| } | ||
|
|
||
| queueSetup() { | ||
| this._queue = async.queue(({ bucket, batch, getNext }, done) => { | ||
| this._queue = async.queue((task, done) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the change? is it not working anymore, or flagged by eslint?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not working anymore with the async bump
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is weird, should be purely a node "syntax" thing, unrelated to async :-/ |
||
| const { bucket, batch, getNext } = task; | ||
|
|
||
| if (this.queueError !== null) { | ||
| return done(); | ||
| } | ||
|
|
@@ -42,15 +44,16 @@ class StalledRequestHandler { | |
| }); | ||
| }, this.concurrentRequests); | ||
|
|
||
| this._queue.error = (err, { bucket, batch }) => { | ||
| this._queue.error((err, task) => { | ||
| const { bucket, batch } = task; | ||
| this.log.error('error occurred while processing request', { | ||
| error: err, | ||
| lastBatch: batch, | ||
| bucket, | ||
| }); | ||
| this.queueError = err; | ||
| this.kill(); | ||
| }; | ||
| }); | ||
| } | ||
|
|
||
| isInProgress() { | ||
|
|
@@ -68,7 +71,7 @@ class StalledRequestHandler { | |
|
|
||
| _waitForCompletion(cb) { | ||
| async.whilst( | ||
| () => (!this.killed && this.isInProgress()), | ||
| async () => (!this.killed && this.isInProgress()), | ||
benzekrimaha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| done => setTimeout(done, 1000), | ||
| cb, | ||
| ); | ||
|
|
@@ -110,7 +113,7 @@ class StalledRequestHandler { | |
|
|
||
| return async.times( | ||
| this.concurrentRequests, | ||
| (_, cb) => nextBatch(cb), | ||
| (n, next) => nextBatch(next), | ||
| err => { | ||
| if (err) { | ||
| this.log.error('failed to populate queue', { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.