Skip to content
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

fix: workaround for participants #67

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ executors:

default-machine:
machine:
image: ubuntu-1604:201903-01
image: ubuntu-2004:202201-02

##
# Jobs
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
command: |
echo "export RELEASE_TAG=$RELEASE_TAG_SNAPSHOT" >> $BASH_ENV
echo "RELEASE_TAG=$RELEASE_TAG_SNAPSHOT"
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
PACKAGE_VERSION=$(cat package.json | jq -r .version)
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
- run:
Expand All @@ -280,14 +280,12 @@ jobs:
- run:
name: Re-tag pre built image
command: |
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
docker tag $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:local $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
- run:
name: Publish Docker image $CIRCLE_TAG & Latest tag to Docker Hub
command: |
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
echo "Publishing $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG"
docker push $DOCKER_ORG/$CIRCLE_PROJECT_REPONAME:$RELEASE_TAG
- run:
name: Set Image Digest
command: |
Expand Down
24 changes: 12 additions & 12 deletions src/App/UserProfile/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ function* fetchUserProfile(action: PayloadAction<string>) {
api.participants.read,
)) as MakeResponse<FetchParticipantsResponse>;

if (assignableParticipantsResponse.status !== 200) {
throw new Error(JSON.stringify(assignableParticipantsResponse));
if (assignableParticipantsResponse.status === 200) {
// throw new Error(JSON.stringify(assignableParticipantsResponse));
userProfile.assignableParticipants = assignableParticipantsResponse.data.participants;

const assignedParticipantsResponse = (yield call(api.userParticipants.read, {
id: action.payload,
})) as MakeResponse<FetchParticipantsResponse>;

if (assignedParticipantsResponse.status !== 200) {
throw new Error(JSON.stringify(assignedParticipantsResponse));
}
userProfile.assignedParticipants = assignedParticipantsResponse.data.participants;
}
userProfile.assignableParticipants = assignableParticipantsResponse.data.participants;

const assignedParticipantsResponse = (yield call(api.userParticipants.read, {
id: action.payload,
})) as MakeResponse<FetchParticipantsResponse>;

if (assignedParticipantsResponse.status !== 200) {
throw new Error(JSON.stringify(assignedParticipantsResponse));
}
userProfile.assignedParticipants = assignedParticipantsResponse.data.participants;

yield put(actions.setUserProfile(userProfile));
} catch (e) {
Expand Down
Loading