Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Dec 11, 2024
1 parent be053af commit 9977a36
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .github/actions/debug-wait/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "Debug wait"
description: "If debugging is enabled, wait"

runs:
using: composite
steps:
- name: "Debug: SSH to runner"
uses: scality/actions/[email protected]
continue-on-error: true
with:
tmate-server-host: ${{ env.TMATE_SERVER_HOST }}
tmate-server-port: ${{ env.TMATE_SERVER_PORT }}
tmate-server-rsa-fingerprint: ${{ env.TMATE_SERVER_RSA_FINGERPRINT }}
tmate-server-ed25519-fingerprint: ${{ env.TMATE_SERVER_ED25519_FINGERPRINT }}
10 changes: 10 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: tests

env:
GINKGO_VERSION: v1.15.2
# DEBUG WAIT
TMATE_SERVER_HOST: ${{ secrets.TMATE_SERVER_HOST }}
TMATE_SERVER_PORT: ${{ secrets.TMATE_SERVER_PORT }}
TMATE_SERVER_RSA_FINGERPRINT: ${{ secrets.TMATE_SERVER_RSA_FINGERPRINT }}
TMATE_SERVER_ED25519_FINGERPRINT: ${{ secrets.TMATE_SERVER_ED25519_FINGERPRINT }}

on:
push:
Expand Down Expand Up @@ -172,6 +177,11 @@ jobs:
with:
testsuite: ingestion
token: ${{ secrets.CODECOV_TOKEN }}

- name: Debug wait
uses: ./.github/actions/debug-wait
timeout-minutes: 90
if: always()

- name: run misc functional tests
uses: ./.github/actions/ft-test
Expand Down
20 changes: 12 additions & 8 deletions extensions/utils/LocationStatusStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,25 @@ class LocationStatusStream {
*/
_initializeLocationStatuses(cb) {
this._locationStatusColl.find({})
.toArray((err, locations) => {
if (err) {
this._log.error('Could not fetch location statuses from mongo', {
method: 'ServiceStatusManager._initializeLocationStatuses',
error: err.message,
});
return cb(err);
}
.toArray()
.then(locations => {
locations.forEach(location => {
const isPaused = location.value[this._serviceName].paused;
if (isPaused) {
this._pauseServiceForLocation(location._id);
}
});
return cb();

})
.catch( err => {

Check warning on line 120 in extensions/utils/LocationStatusStream.js

View workflow job for this annotation

GitHub Actions / tests

There should be no space after this paren

Check warning on line 120 in extensions/utils/LocationStatusStream.js

View workflow job for this annotation

GitHub Actions / tests

Expected to return a value at the end of arrow function
if (err) {
this._log.error('Could not fetch location statuses from mongo', {
method: 'ServiceStatusManager._initializeLocationStatuses',
error: err.message,
});
return cb(err);
}
});
}

Expand Down

0 comments on commit 9977a36

Please sign in to comment.