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

Bring production up to date properly #401

Merged
merged 58 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
00f2abe
Documentation: Add documentation for the staging and production insta…
jennyziyi-xu Aug 26, 2022
0617c89
Merge outstanding dependency updates (#331)
frewmack Jan 18, 2023
c964ccc
Add gnomadHet column w/ number of heterozygotes (#334)
frewmack Feb 24, 2023
82fcc74
Add maleCount field to table rows (#335)
frewmack Mar 6, 2023
b11acab
Fix male count (#337)
frewmack Mar 6, 2023
21a9401
Add allele count column, remove gnomadHet and male count (#338)
frewmack Mar 10, 2023
68f477b
React: Bump timeout from 90 sec to 900 sec (#339)
frewmack May 11, 2023
f4c5e78
CMH Integration (#341)
frewmack May 15, 2023
f612c7f
Bump keycloak-connect from 17.0.0 to 21.0.1 in /server (#336)
dependabot[bot] May 24, 2023
f1f9a3f
Bump undici from 5.9.1 to 5.19.1 in /server (#333)
dependabot[bot] May 24, 2023
4e75725
Rearrange columns, add tooltips (#342)
frewmack May 24, 2023
a6cb45d
Fix CMH assembly (#343)
frewmack Jun 7, 2023
2e6a9c0
Perform LiftOver for CMH query results (GRCh38 -> h37) (#353)
frewmack Aug 18, 2023
801aba8
Bump word-wrap from 1.2.3 to 1.2.4 in /server (#350)
dependabot[bot] Aug 18, 2023
0600cb4
Bump word-wrap from 1.2.3 to 1.2.4 in /test-node (#351)
dependabot[bot] Aug 18, 2023
510875d
Bump word-wrap from 1.2.3 to 1.2.4 in /react (#352)
dependabot[bot] Aug 18, 2023
156c541
Bump semver from 5.7.1 to 5.7.2 in /test-node (#348)
dependabot[bot] Aug 18, 2023
e796a1e
Bump semver from 6.3.0 to 6.3.1 in /server (#347)
dependabot[bot] Aug 18, 2023
d20ffcd
Bump semver from 5.7.1 to 5.7.2 in /react (#346)
dependabot[bot] Aug 18, 2023
081873b
Bump tough-cookie from 4.0.0 to 4.1.3 in /react (#345)
dependabot[bot] Aug 18, 2023
dc5f417
Bump tough-cookie from 4.0.0 to 4.1.3 in /server (#344)
dependabot[bot] Aug 18, 2023
e449998
Bump mongoose from 6.4.6 to 6.11.3 in /server (#349)
dependabot[bot] Aug 18, 2023
387f570
Set ApolloServer cache to bounded (#354)
frewmack Aug 18, 2023
37067ec
Bump apollo-server-core from 3.10.1 to 3.12.1 in /server (#356)
dependabot[bot] Aug 31, 2023
e38154c
Add check for hg38 before filtering gene hits (#357)
frewmack Aug 31, 2023
27f7adf
Bump @babel/traverse from 7.17.3 to 7.23.2 in /react (#360)
dependabot[bot] Oct 17, 2023
66401bf
Bump graphql from 16.3.0 to 16.8.1 in /server (#358)
dependabot[bot] Oct 17, 2023
0a6086e
Bump undici from 5.19.1 to 5.26.3 in /server (#359)
dependabot[bot] Oct 17, 2023
25ea9e6
Bump @babel/traverse from 7.17.9 to 7.23.2 in /server (#361)
dependabot[bot] Oct 17, 2023
322c53a
Bump browserify-sign from 4.2.1 to 4.2.2 in /react (#363)
dependabot[bot] Nov 13, 2023
2929d90
Bump chromedriver from 100.0.0 to 119.0.1 in /server (#364)
dependabot[bot] Nov 13, 2023
5c89adb
Bump axios from 0.26.1 to 1.6.0 in /server (#365)
dependabot[bot] Nov 13, 2023
f3baf3c
Add PT Pagination support for G4RD Staging (#366)
frewmack Jan 17, 2024
ae2e5ea
Server: fix pagination bugs with G4RD (#369)
frewmack Jan 19, 2024
e52db28
Add retries to fetchPhenotipsVariants (#370)
frewmack Jan 23, 2024
60dd5ab
Server: formatting
frewmack Jan 23, 2024
377c9f6
Handle null params passed to transform func (#371)
frewmack Feb 1, 2024
f9ba57f
TEMPORARY: trace GC in staging/prod server (#372)
frewmack Feb 6, 2024
a0a7fee
TEMPORARY: Add heap profiler for staging/prod (#373)
frewmack Feb 6, 2024
f03854e
TEMPORARY: inspect-brk
frewmack Feb 9, 2024
59ba074
TEMPORARY: inspect-brk to localhost
frewmack Feb 9, 2024
acd7eac
TEMPORARY: put inspect back to global
frewmack Feb 9, 2024
b808eb9
TEMPORARY: revert to inspect, not inspect-brk
frewmack Feb 9, 2024
ac27bac
TEMPORARY: make smaller heap to debug
frewmack Feb 9, 2024
17dbe44
TEMPORARY: smaller heap limit
frewmack Feb 9, 2024
78276a2
Remove node debugging flags
frewmack Feb 9, 2024
54a6ecb
All: Merge outstanding dependency updates (#378)
frewmack Mar 1, 2024
8ca2dab
Frontend: Update search bar to allow search by position only (#382)
frewmack Mar 18, 2024
6a66d68
React: Remove errant console.log
frewmack Mar 18, 2024
5ceb6e9
React/Server: Add Gene Name to results table (#383)
frewmack Mar 18, 2024
52f973b
Server: implement support for Pagination API on CMH (#390)
frewmack Apr 15, 2024
c597d0f
CI/CD: Fix deprecated workflow commands in GitHub Actions workflows (…
frewmack Apr 16, 2024
5621d05
Undo SSH configure workflow change (#392)
frewmack Apr 17, 2024
4a225f8
Server: Fix Gnomad annotation bug with GRCh38 + CMH (#395)
frewmack May 21, 2024
f816617
All: merge outstanding dependencies (#396)
frewmack May 21, 2024
728e575
Add CMH environment to node prod workflow (#397)
frewmack May 21, 2024
a6eafb4
Merge branch 'production' into develop
frewmack May 21, 2024
3a83926
Trim whitespace from sources in environment (#399)
frewmack May 27, 2024
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
18 changes: 13 additions & 5 deletions .github/workflows/node-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:
run:
working-directory: server
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
environment: OSMP_PROD
concurrency: OSMP_PROD
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: docker/login-action@v1
with:
registry: ghcr.io
Expand Down Expand Up @@ -118,6 +118,14 @@ jobs:
G4RD_GRANT_TYPE: ${{ secrets.G4RD_GRANT_TYPE }}
G4RD_TOKEN_URL: ${{ secrets.G4RD_TOKEN_URL }}
G4RD_CLIENT_ID: ${{ secrets.G4RD_CLIENT_ID }}
CMH_AZURE_CLIENT_ID: ${{ secrets.CMH_AZURE_CLIENT_ID }}
CMH_AZURE_CLIENT_SECRET: ${{ secrets.CMH_AZURE_CLIENT_SECRET }}
CMH_TOKEN_URL: ${{ secrets.CMH_TOKEN_URL }}
CMH_RESOURCE: ${{ secrets.CMH_RESOURCE }}
CMH_SCOPE: ${{ secrets.CMH_SCOPE }}
CMH_GRANT_TYPE: ${{ secrets.CMH_GRANT_TYPE }}
CMH_GENE42_SECRET: ${{ secrets.CMH_GENE42_SECRET }}
CMH_URL: ${{ secrets.CMH_URL }}
KEYCLOAK_AUTH_URL: ${{ secrets.KEYCLOAK_AUTH_URL }}
KEYCLOAK_REALM: ${{ secrets.KEYCLOAK_REALM }}
KEYCLOAK_CLIENT_ID: ${{ secrets.KEYCLOAK_CLIENT_ID }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ jobs:
run:
working-directory: server
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn
Expand Down Expand Up @@ -77,17 +77,17 @@ jobs:
run:
working-directory: test-node
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
environment: SSMP_SERVER_DEV
concurrency: SSMP_SERVER_DEV
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: docker/login-action@v1
with:
registry: ghcr.io
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/react-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
shell: bash
working-directory: react
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -69,14 +69,14 @@ jobs:
concurrency: OSMP_PROD
if: github.ref == 'refs/heads/production'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Get yarn cache path
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: restore
with:
path: |
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
shell: bash
working-directory: react
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -58,14 +58,14 @@ jobs:
concurrency: SSMP_BUILD
if: github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Get yarn cache path
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: restore
with:
path: |
Expand Down
3 changes: 1 addition & 2 deletions react/src/components/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ interface ComboBoxProps<T> {
}

export const Wrapper = styled(Flex)`
position: relative
min-height: 38px;
flex-wrap: wrap;
flex-grow: 0;
Expand Down Expand Up @@ -128,7 +127,7 @@ export default function ComboBox<T extends {}>({
</>
)}
</Header>
<SelectableListWrapper fullWidth>
<SelectableListWrapper>
{open && (
<SelectableList
ref={ref}
Expand Down
19 changes: 19 additions & 0 deletions react/src/components/ErrorText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import styled from 'styled-components/macro';
import Typography from './Typography';

const ErrorWrapper = styled.div`
margin: 0 0 ${props => props.theme.space[2]};
padding: ${props => props.theme.space[4]} 0.75rem 0;
`;

const ErrorText: React.FC<{ error?: string }> = ({ error }) =>
error ? (
<ErrorWrapper>
<Typography error variant="subtitle" bold condensed>
{error}
</Typography>
</ErrorWrapper>
) : null;

export default ErrorText;
145 changes: 145 additions & 0 deletions react/src/components/Search/GeneCombinedSearch.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
import React, { useState } from 'react';
import { FaCaretDown } from 'react-icons/fa';
import styled from 'styled-components/macro';
import { useClickAway } from '../../hooks';
import { AssemblyId } from '../../types';
import { Flex } from '../Layout';
import SelectableList, { SelectableListItem, SelectableListWrapper } from '../SelectableList';
import GeneNameSearch, { GeneSelectionValue } from './GeneNameSearch';
import GenePositionSearch from './GenePositionSearch';

const SearchWrapper = styled(Flex)`
position: relative
min-height: 40px;
flex-wrap: nowrap;
flex-grow: 1;
position: relative;
width: 100%;
`;

const DropdownWrapper = styled(Flex)`
position: relative;
min-height: 38px;
flex-grow: 0;
`;

const DropdownHeader = styled(Flex)`
background-color: ${props => props.theme.background.main};
border: ${props => props.theme.borders.thin};
border-color: ${props => props.theme.colors.muted};
border-radius: ${props => props.theme.radii.base};
box-shadow: ${props => props.theme.boxShadow};
color: ${props => props.theme.colors.muted};
padding: 0 ${props => props.theme.space[4]};
flex-wrap: nowrap;
text-wrap: nowrap;
overflow: hidden;
white-space: nowrap;
min-height: 40px;
align-items: center;
justify-content: space-between;
cursor: pointer;
`;

const DropdownHeaderText = styled.div`
color: ${props => props.theme.colors.text};
cursor: pointer;
font-size: 14px;
`;

interface DropdownProps {
options: SelectableListItem<string>[];
value: string;
onSelect: (option: string) => void;
}

/**
* Dropdown component for selecting search type.
*/
const Dropdown: React.FC<DropdownProps> = props => {
// ComboBox styling is too deep, so we need our own dropdown

const [open, setOpen] = useState<Boolean>(false);

const ignoreRef = React.useRef() as React.MutableRefObject<HTMLDivElement>;
const ref = React.useRef() as React.MutableRefObject<HTMLUListElement>;

useClickAway(ref, () => setOpen(false), ignoreRef);

return (
<DropdownWrapper ref={ignoreRef}>
<DropdownHeader tabIndex={0} role="button" onClick={() => setOpen(true)}>
<DropdownHeaderText>{props.value}</DropdownHeaderText>
<FaCaretDown
style={{
marginLeft: '8px',
}}
/>
</DropdownHeader>
<SelectableListWrapper>
{open && (
<SelectableList
ref={ref}
options={props.options}
onSelect={item => {
props.onSelect(item as string);
setOpen(false);
}}
/>
)}
</SelectableListWrapper>
</DropdownWrapper>
);
};

interface GeneCombinedSearchProps {
assembly: AssemblyId;
geneName: string;
onNameChange: (geneName: string) => void;
onNameSelect: (gene: GeneSelectionValue) => void;
genePosition: string;
onPositionChange: (genePosition: string) => void;
onError?: (errorText: string | undefined) => void;
}

const OPTIONS = ['Gene Name', 'Position'];

/**
* Combined search component for searching by gene name or by position.
* Contains a dropdown integrated into the search bar where the user can
* switch between search modes.
*/
const GeneCombinedSearch: React.FC<GeneCombinedSearchProps> = props => {
const [searchMode, setSearchMode] = useState<string>(OPTIONS[0]);

return (
<SearchWrapper>
<Dropdown
options={OPTIONS.map((a, id) => ({
id,
value: a,
label: a,
}))}
onSelect={option => setSearchMode(option)}
value={searchMode}
/>
{searchMode === 'Gene Name' && (
<GeneNameSearch
assembly={props.assembly}
geneName={props.geneName}
onChange={props.onNameChange}
onSelect={props.onNameSelect}
/>
)}
{searchMode === 'Position' && (
<GenePositionSearch
position={props.genePosition}
onChange={props.onPositionChange}
onError={props.onError}
/>
)}
</SearchWrapper>
);
};

export default GeneCombinedSearch;
Loading