-
Notifications
You must be signed in to change notification settings - Fork 0
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
bacpop-25 use gps v6 db #42
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
=======================================
Coverage 98.91% 98.91%
=======================================
Files 31 31
Lines 648 648
Branches 105 105
=======================================
Hits 641 641
Misses 7 7 ☔ View full report in Codecov by Sentry. |
@@ -50,7 +50,7 @@ jobs: | |||
with: | |||
node-version: ${{ matrix.node-version }} | |||
cache: 'npm' | |||
cache-dependency-path: ./app/client/package-lock.json | |||
cache-dependency-path: ./app/server/package-lock.json |
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.
This path just seemed to be wrong!
|
||
const { toLocaleString } = Date.prototype; | ||
// eslint-disable-next-line no-extend-native | ||
// eslint-disable-next-line no-extend-native, func-names |
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.
Disabling this rule here to remove lint warning .
@@ -43,19 +44,18 @@ describe("Error handling", () => { | |||
testSample.projectId = projectId; | |||
const poppunkRes = await post(`poppunk`, testSample, connectionCookie); | |||
expect(poppunkRes.status).toBe(200); | |||
const counter = 0; | |||
let counter = 0; |
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.
This counter hadn't been counting!
await new Promise(resolve => { | ||
setTimeout(() => {resolve(""), 1000}) | ||
}); | ||
await setTimeout(2000); |
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.
The previous attempt at delays between polling hadn't been working, so we were getting some intermittent test failures, which I think were related to spamming the endpoint. Bumping up the delay as well to avoid intermittent errors on first poll .
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.
can we use fake timers here instead if possible?
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.
Unfortunately not, as we're waiting for a popunk job to finish and polling the real beebop_py api.
const statusRes = await post("status", {hash: testSample.projectHash}, connectionCookie); | ||
expect(statusRes.status).toBe(200); | ||
// This is occasionally mysteriously flaky on CI and I haven't been able to diagnose why - surface the |
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.
sigh
scripts/run_dependencies
Outdated
@@ -2,7 +2,7 @@ NETWORK=beebop_nw | |||
VOLUME=beebop-storage | |||
NAME_REDIS=beebop-redis | |||
NAME_API=beebop-py-api | |||
API_BRANCH=main | |||
API_BRANCH=bacpop-25 |
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.
leaving comment so can be changed before merge
LGTM and worked well |
-v $VOLUME:/beebop/storage \ | ||
mrcide/beebop-py:$API_BRANCH rqworker | ||
docker run -d --rm --name $NAME_API --network=$NETWORK \ | ||
--pull always \ |
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.
should this pull not be retained? also the --rm?
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.
The rm should! I'll re-add that. I've moved the pull to previous docker run, which is for the same image - mrcide/beebop-py:$API_BRANCH
scripts/run_dependencies
Outdated
--env=REDIS_HOST="$NAME_REDIS" \ | ||
--env=STORAGE_LOCATION="./storage" \ | ||
--env=DB_LOCATION="./storage/GPS_v4_references" \ | ||
--env=DB_LOCATION="./storage/GPS_v6_references" \ |
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.
will we ever run with v4 again?
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.
Probably not. Are you thinking we could just have a fixed storage location?
This PR: #46 adds a docker quick start and includes commits from this branch too - may make it easier to test! |
bacpop-145 Docker quick run
const fakeProjectHash = `${projectId}ABC`; | ||
const projectData = testSample(fakeProjectHash, projectId); | ||
const poppunkRes = await post(`poppunk`, projectData, connectionCookie); |
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.
So I think part of the problem was that we weren't using a unique project hash every time we ran poppunk, so I've changed testSample
from an object to a function, and making a new hash for each new project id...
@@ -2,5 +2,6 @@ | |||
module.exports = { | |||
preset: 'ts-jest', | |||
testEnvironment: 'node', | |||
testTimeout: 120000 | |||
testTimeout: 120000, | |||
maxWorkers: 1 |
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.
...but I think the main issue was that the persistence tests were blitzing redis, and they were potentially running in parallel with the error tests. So limiting to sequential run here...
Target beebop_py branch which uses gps v6 db, and use v6 location.
Also a few changes related to intermittent test failures (described inline) - one still seems to be an issue, but not when I'm watching... 🙈
To be reviewed in conjunction with the corresponding beebop_py branch: bacpop/beebop_py#32