Skip to content

Commit

Permalink
Merge pull request #213 from icgc-argo/rc/1.26.0
Browse files Browse the repository at this point in the history
Release Candidate 1.26.0
  • Loading branch information
Buwujiu authored Aug 16, 2021
2 parents 5d5f036 + d06f8b0 commit a02b1c9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
15 changes: 8 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,25 @@ spec:
- name: docker
image: docker:18-git
tty: true
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
- name: HOME
value: /home/jenkins/agent
- name: dind-daemon
image: docker:18.06-dind
args: ["--registry-mirror", "https://registry.dev.argo.cancercollaboratory.org"]
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
securityContext:
runAsUser: 1000
volumes:
- name: docker-graph-storage
emptyDir: {}
- name: docker-sock
hostPath:
path: /var/run/docker.sock
type: File
"""
}
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "donor-submission-aggregator",
"version": "1.25.0",
"version": "1.26.0",
"description": "Donor aggregation service for the ICGC-ARGO Submission System",
"main": "src",
"scripts": {
Expand Down
10 changes: 9 additions & 1 deletion src/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ export const createEgoJwtManager = async (): Promise<EgoJwtManager> => {
egoTokenUtil = await createEgoUtil();
return await getJwt();
case false:
cachedJwt = egoTokenUtil.isValidJwt() ? await getJwt() : cachedJwt;
const isTokenValid = egoTokenUtil.isValidJwt(cachedJwt.access_token);
// todo remove loggings once jwt issue is gone.
logger.info(`Is current JWT token valid? ${isTokenValid}`);
isTokenValid
? logger.info(
`Current JWT is valid, expiring in ${cachedJwt.expires_in} seconds.`
)
: logger.info(`Current JWT is invalid, getting a new JWT...`);
cachedJwt = isTokenValid ? cachedJwt : await getJwt();
return cachedJwt;
}
};
Expand Down

0 comments on commit a02b1c9

Please sign in to comment.