Skip to content

Commit

Permalink
Merge pull request #230 from umccr/dev
Browse files Browse the repository at this point in the history
Hot fix - debug authentication issues
  • Loading branch information
alexiswl authored May 27, 2024
2 parents bbcd75a + 7ad155d commit 79341b9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ Changes in this log refer only to changes that make it to the 'main' branch. and

For changes in deployment, please see the [deployment changelog](deploy/cttso-ica-to-pieriandx-cdk/Changelog.md)

## 2024-05-27

> Author: Alexis Lucattini
> Email: [Alexis.Lucattini@umccr.org](mailto:alexis.lucattini@umccr.org)
### Hotfix

* Debug authentication issues (https://github.com/umccr/cttso-ica-to-pieriandx/issues/229)

## 2024-05-06

> Author: Alexis Lucattini
Expand Down
9 changes: 9 additions & 0 deletions deploy/cttso-ica-to-pieriandx-cdk/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Changes in this log refer only to changes that make it to the 'main' branch and
are nested under deploy/cttso-ica-to-pieriandx-cdk.

## 2024-05-27

> Author: Alexis Lucattini
> Email: [Alexis.Lucattini@umccr.org](mailto:alexis.lucattini@umccr.org)
### Hotfix

* Debug authentication issues (https://github.com/umccr/cttso-ica-to-pieriandx/issues/229)

## 2024-05-23

> Author: Alexis Lucattini
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ PIERIANDX_AWS_SECRET_ACCESS_KEY="$(
# Collect the pieriandx access token
# We assume that there is more than 5 minutes left on the clock
while :; do
PIERIANDX_USER_AUTH_TOKEN="$(get_pieriandx_access_token)"
[[ -z "${PIERIANDX_USER_AUTH_TOKEN}" ]] || break
sleep 10
echo_stderr "Collecting PierianDx access token..."
if ! PIERIANDX_USER_AUTH_TOKEN="$(get_pieriandx_access_token)"; then
sleep 10
else
break
fi
done

# Export env vars
Expand Down
1 change: 1 addition & 0 deletions scripts/cttso-ica-to-pieriandx.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
Run sample on ICA to PierianDx
"""
from __future__ import annotations

from typing import Dict, Match
from pathlib import Path
Expand Down
5 changes: 5 additions & 0 deletions utils/accession.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def get_cases_df() -> pd.DataFrame:
logger.debug("Printing response")
if response is None:
logger.warning(f"Trying again to get cases - attempt {iter_count}")
logger.warning(f"Client vars were: "
f"'baseurl': {pyriandx_client.baseURL}, "
f"'email': {pyriandx_client.headers['X-Auth-Email']}, "
f"'institution': {pyriandx_client.headers['X-Auth-Institution']}, "
f"'Token': {pyriandx_client.headers['X-Auth-Token'][:5]}***{pyriandx_client.headers['X-Auth-Token'][-5:]}")
time.sleep(LIST_CASES_RETRY_TIME)
else:
break
Expand Down
2 changes: 1 addition & 1 deletion utils/pieriandx_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def get_pieriandx_client(email: str = environ.get("PIERIANDX_USER_EMAIL", None),
key=token,
institution=instiution,
base_url=base_url,
key_is_auth_token=True)
key_is_auth_token=True)

0 comments on commit 79341b9

Please sign in to comment.