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

[do not merge] Bisect PR to locate bug #1756

Closed
wants to merge 5 commits into from
Closed
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
3 changes: 0 additions & 3 deletions backend/src/main/kotlin/org/loculus/backend/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ enum class MetadataType {
@JsonProperty("boolean")
BOOLEAN,

@JsonProperty("authors")
AUTHORS,

;

override fun toString(): String = lowerCase(name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class ProcessedSequenceEntryValidator(
}

val isOfCorrectPrimitiveType = when (metadata.type) {
MetadataType.STRING, MetadataType.AUTHORS -> fieldValue.isTextual
MetadataType.STRING -> fieldValue.isTextual
MetadataType.INTEGER -> fieldValue.isInt
MetadataType.FLOAT -> fieldValue.isFloatingPointNumber
MetadataType.NUMBER -> fieldValue.isNumber
Expand Down
10 changes: 5 additions & 5 deletions deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
HELM_CHART_DIR = ROOT_DIR / 'kubernetes' / 'loculus'
HELM_VALUES_FILE = HELM_CHART_DIR / 'values.yaml'

WEBSITE_PORT_MAPPING = '-p 127.0.0.1:3000:30081@agent:0'
BACKEND_PORT_MAPPING = '-p 127.0.0.1:8079:30082@agent:0'
LAPIS_PORT_MAPPING = '-p 127.0.0.1:8080:80@loadbalancer'
DATABASE_PORT_MAPPING = '-p 127.0.0.1:5432:30432@agent:0'
KEYCLOAK_PORT_MAPPING = '-p 127.0.0.1:8083:30083@agent:0'
WEBSITE_PORT_MAPPING = '-p 3000:30081@agent:0'
BACKEND_PORT_MAPPING = '-p 8079:30082@agent:0'
LAPIS_PORT_MAPPING = '-p 8080:80@loadbalancer'
DATABASE_PORT_MAPPING = '-p 5432:30432@agent:0'
KEYCLOAK_PORT_MAPPING = '-p 8083:30083@agent:0'

PORTS = [WEBSITE_PORT_MAPPING, BACKEND_PORT_MAPPING, LAPIS_PORT_MAPPING, DATABASE_PORT_MAPPING, KEYCLOAK_PORT_MAPPING]

Expand Down
5 changes: 0 additions & 5 deletions kubernetes/loculus/templates/_config-processor.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
secretKeyRef:
name: backend-keycloak-client-secret
key: backendKeycloakClientSecret
- name: LOCULUSSUB_orcidSecret
valueFrom:
secretKeyRef:
name: orcid
key: orcidSecret
{{- end }}


Expand Down
4 changes: 2 additions & 2 deletions kubernetes/loculus/templates/keycloak-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data:
"accessTokenLifespan": 36000,
"ssoSessionIdleTimeout": 36000,
"users": [
{{ if $.Values.createTestAccounts }}
{{ if $.Values.devMode }}
{{- $browsers := list "firefox" "webkit" "chromium"}}
{{- range $_, $browser := $browsers }}
{{- range $index, $_ := until 20}}
Expand Down Expand Up @@ -332,7 +332,7 @@ data:
"linkOnly" : false,
"firstBrokerLoginFlowAlias" : "first broker login",
"config" : {
"clientSecret" : "[[orcidSecret]]",
"clientSecret" : "65897b89-a888-427d-8828-1f1dd97bf6c1",
"clientId" : "APP-P1P7N7T9YVBHQ4EH"
}
} ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
metadata:
{{- range (concat $commonMetadata .metadata) }}
- name: {{ .name }}
type: {{ (.type | eq "timestamp") | ternary "int" ((.type | eq "authors") | ternary "string" .type) }}
type: {{ (.type | eq "timestamp") | ternary "int" .type }}
{{- if .generateIndex }}
generateIndex: {{ .generateIndex }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/loculus/templates/loculus-website-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data:
runtime_config.json: |
{
"name" : "{{ $.Values.name }}",
"insecureCookies": {{ $.Values.insecureCookies }},
"devMode": {{ $.Values.devMode }},
"serverSide": {
{{- if .Values.usePublicRuntimeConfigAsServerSide }}
{{- template "loculus.publicRuntimeConfig" dict "Values" .Values "externalLapisUrlConfig" $externalLapisUrlConfig -}}
Expand Down
8 changes: 2 additions & 6 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ defaultOrganisms:
header: Authors
- name: authors
displayName: Authors
type: authors
type: string
header: Authors
- name: submitter_country
displayName: Submitter country
Expand Down Expand Up @@ -876,7 +876,7 @@ auth:
envelopeFrom: "[email protected]"
verifyEmail: true
resetPasswordAllowed: true
insecureCookies: false
devMode: true # TODO https://github.com/loculus-project/loculus/issues/1568: remove this from default Values
bannerMessage: "This is a development environment. Data will not be persisted."
additionalHeadHTML: '<script defer data-domain="main.loculus.org" src="https://plausible.io/js/script.js"></script>'
imageTags:
Expand Down Expand Up @@ -922,10 +922,6 @@ secrets:
type: raw
data:
initialAdminPassword: "admin"
orcid:
type: raw
data:
orcidSecret: "dummy"
enableCrossRefCredentials: true
runDevelopmentKeycloakDatabase: true
runDevelopmentMainDatabase: true
3 changes: 1 addition & 2 deletions kubernetes/loculus/values_e2e_and_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ secrets:
insdcIngestUserPassword: "insdc_ingest"
dummyPreprocessingPipelinePassword: "preprocessing_pipeline"
siloImportJobPassword: "silo_import_job"
backendUserPassword: "backend"
createTestAccounts: true
backendUserPassword: "backend"
6 changes: 0 additions & 6 deletions kubernetes/loculus/values_preview_server.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
createTestAccounts: true
secrets:
smtp-password:
type: sealedsecret
clusterWide: "true"
data:
secretKey: AgCoDKVhu9eUF90E2CXJmF4CVFDHe8zHyQqQLNDaJ4dlCkm2Q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ZTyTpSxikpHDKK9Zcz9woh/+R4BUKjjO1zpHWFPV5jY+hzY+rxfHTP8VX0txyMsBVEafDRL0R3YYz8rUBzXC4C6IFJLK0QmJKD7GHQM2Ue6SjGkr49k1ZPSGCGAJ16IZCe3l3lVhzncobpEBPx4qYJhD8oo+ZIt7YIZ/Egmkza+DFAAWmtSCEztL85Y3pNN5g3SVn6urSKZbNUeI6rC4JqwS6Uk2370VrvEEufml9fXOdE5ATO5C+zHj3AWd0zancDsk4nQegbE5fjLblGfQ1g/ID2OHCFaw7FMBItrE+R5VkTwN5nuszAnWXc191T7PS3mWrYBDrjbqHOr/P1X6BZWT0Q7bqR8y5d2JUX5qNaHI4s4WN43Z/m0oPRMZC0WHn/ebtPPukoKRWnMWqN8MTwnB9oHV/84egrHUY=
10 changes: 5 additions & 5 deletions website/src/components/ReviewPage/ReviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '../../types/backend.ts';
import { type ClientConfig } from '../../types/runtimeConfig.ts';
import { displayConfirmationDialog } from '../ConfirmationDialog.tsx';
import { getLastApprovalTimeKey } from '../SearchPage/RecentSequencesBanner.tsx';
import { LAST_APPROVAL_TIME_LOCAL_STORAGE_KEY } from '../SearchPage/RecentSequencesBanner.tsx';
import { ManagedErrorFeedback, useErrorFeedbackState } from '../common/ManagedErrorFeedback.tsx';
import { withQueryProvider } from '../common/withQueryProvider.tsx';
import BiTrash from '~icons/bi/trash';
Expand Down Expand Up @@ -284,7 +284,7 @@ const InnerReviewPage: FC<ReviewPageProps> = ({ clientConfig, organism, group, a
scope: approveAllDataScope.value,
});

storeLastApprovalTime(organism);
storeLastApprovalTime();
},
})
}
Expand All @@ -310,7 +310,7 @@ const InnerReviewPage: FC<ReviewPageProps> = ({ clientConfig, organism, group, a
groupIdsFilter: [group.groupId],
scope: approveAllDataScope.value,
});
storeLastApprovalTime(organism);
storeLastApprovalTime();
}}
deleteAccessionVersion={() =>
hooks.deleteSequenceEntries({
Expand Down Expand Up @@ -355,9 +355,9 @@ const InnerReviewPage: FC<ReviewPageProps> = ({ clientConfig, organism, group, a
);
};

const storeLastApprovalTime = (organism: string) => {
const storeLastApprovalTime = () => {
const lastApprovalTime = Math.floor(Date.now() / 1000);
localStorage.setItem(getLastApprovalTimeKey(organism), lastApprovalTime.toString());
localStorage.setItem(LAST_APPROVAL_TIME_LOCAL_STORAGE_KEY, lastApprovalTime.toString());
};

export const ReviewPage = withQueryProvider(InnerReviewPage);
12 changes: 4 additions & 8 deletions website/src/components/SearchPage/RecentSequencesBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import React, { useEffect, useState } from 'react';

export const getLastApprovalTimeKey = (organism: string) => organism + 'lastApprovalTime';
export const LAST_APPROVAL_TIME_LOCAL_STORAGE_KEY = 'lastApprovalTime';

interface RecentSequencesBannerProps {
organism: string;
}

export const RecentSequencesBanner: React.FC<RecentSequencesBannerProps> = ({ organism }) => {
export const RecentSequencesBanner: React.FC = () => {
const [showBanner, setShowBanner] = useState(false);

useEffect(() => {
const checkApprovalTime = () => {
const lastApproveTimeString = localStorage.getItem(getLastApprovalTimeKey(organism));
const lastApproveTimeString = localStorage.getItem(LAST_APPROVAL_TIME_LOCAL_STORAGE_KEY);
if (lastApproveTimeString === null) {
setShowBanner(false);
return;
Expand All @@ -28,7 +24,7 @@ export const RecentSequencesBanner: React.FC<RecentSequencesBannerProps> = ({ or

// Clear the interval on component unmount
return () => clearInterval(intervalId);
}, [organism]);
}, []);
if (!showBanner) {
return null;
}
Expand Down
3 changes: 2 additions & 1 deletion website/src/components/SearchPage/SearchFullUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const SearchFullUI = ({
/>
</div>
<div className='flex-1'>
<RecentSequencesBanner organism={organism} />
<RecentSequencesBanner />
<div className=' text-sm text-gray-800 mb-6 justify-between flex px-6 items-baseline'>
<div className='mt-auto'>
Search returned {data.totalCount.toLocaleString()} sequence{data.totalCount === 1 ? '' : 's'}
Expand All @@ -101,6 +101,7 @@ export const SearchFullUI = ({
orderBy={orderBy}
classOfSearchPage={SEARCH}
/>

<div className='mt-4 flex justify-center'>
<SearchPagination
count={Math.ceil(data.totalCount / pageSize)}
Expand Down
63 changes: 0 additions & 63 deletions website/src/components/SequenceDetailsPage/AuthorList.tsx

This file was deleted.

19 changes: 5 additions & 14 deletions website/src/components/SequenceDetailsPage/DataTable.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
import { AuthorList } from './AuthorList';
import { DataUseTermsHistoryModal } from './DataUseTermsHistoryModal';
import { SubstitutionsContainer } from './MutationBadge';
import { getDataTableData } from './getDataTableData';
import { type TableDataEntry } from './getTableData';
import { toHeaderMap, type TableDataEntry } from './getTableData';
import { type DataUseTermsHistoryEntry } from '../../types/backend';

interface Props {
Expand All @@ -12,25 +10,18 @@ interface Props {
}

const { tableData, dataUseTermsHistory } = Astro.props;
const data = getDataTableData(tableData);
const headerMap = toHeaderMap(tableData);
---

<div>
{
data.topmatter.authors !== undefined && data.topmatter.authors.length > 0 && (
<div class='px-6 mb-4'>
<AuthorList authors={data.topmatter.authors} client:load />
</div>
)
}
<div class='mt-2'>
<div>
{
data.table.map(({ header, rows }) => (
Object.entries(headerMap).map(([header, names]) => (
<div class='pb-8'>
{header !== '' && <h1 class='py-2 font-medium text-primary-600'>{header}</h1>}
<table class='table-auto'>
<tbody class='bg-white'>
{rows.map(({ label, value, customDisplay }) => (
{names.map(({ label, value, customDisplay }) => (
<tr>
<td class='py-1 w-44 text-sm font-medium text-gray-900 text-right'>{label}</td>
<td class='px-4 py-1 text-sm text-gray-600'>
Expand Down

This file was deleted.

Loading
Loading