Skip to content

Commit

Permalink
Merge branch 'master' into arm
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Oct 30, 2024
2 parents c595f89 + e349e02 commit 6577f59
Show file tree
Hide file tree
Showing 20 changed files with 67 additions and 31 deletions.
6 changes: 5 additions & 1 deletion deploy/helm/aws-login/templates/aws-ecr-login-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ spec:
configMapKeyRef:
key: DOCKER_EMAIL
name: {{ .Values.awsEcr.configName }}
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
6 changes: 5 additions & 1 deletion deploy/helm/aws-login/templates/aws-ecr-login-oneshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ spec:
configMapKeyRef:
key: DOCKER_EMAIL
name: "{{ .Values.awsEcr.configName }}"
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ spec:
configMapKeyRef:
key: VERBOSE
name: {{ .Values.envName | quote }}
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ spec:
configMapKeyRef:
key: VERBOSE
name: {{ .Values.envName | quote }}
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ spec:
resources:
requests:
cpu: 2m
memory: 100M
memory: 128Mi
limits:
memory: 150M
memory: 128Mi
restartPolicy: Always
{{- if ne .Values.global.pullSecretName "None" }}
imagePullSecrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ spec:
resources:
requests:
cpu: 1m
memory: 10M
memory: 128Mi
limits:
memory: 50M
memory: 128Mi
volumeMounts:
- name: nginx-html
mountPath: /usr/share/nginx/html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ spec:
image: {{ include "create-admin-user.containerImage" . }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: create-admin-user
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
volumeMounts:
- mountPath: /home/app/.CombineFiles
name: backend-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ spec:
resources:
requests:
cpu: 5m
memory: 960Mi
memory: 2Gi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 4Gi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
resources:
requests:
cpu: 25m
memory: 950Mi
memory: 1Gi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 2Gi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ spec:
resources:
requests:
cpu: 1m
memory: 15M
memory: 128Mi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 40M
memory: 128Mi
{{- end }}
volumeMounts:
- mountPath: /usr/share/nginx/fonts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ spec:
resources:
requests:
cpu: 200m
memory: 150M
memory: 128Mi
limits:
memory: 150M
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ spec:
- deployment/maintenance
- --
- get-fonts.sh
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ spec:
resources:
requests:
cpu: 200m
memory: 1200Mi
memory: 1Gi
{{- if .Values.global.includeResourceLimits }}
limits:
memory: 4Gi
memory: 2Gi
{{- end }}
volumeMounts:
- mountPath: {{ .Values.fontsDir }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ spec:
- {{ $lang | quote }}
{{- end }}
{{- end }}
resources: {}
resources:
requests:
memory: 128Mi
limits:
memory: 128Mi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
Expand Down
10 changes: 5 additions & 5 deletions deploy/scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,16 @@ def main() -> None:

# Setup required build engine - docker or nerdctl
container_cmd = [os.getenv("CONTAINER_CLI", "docker")]
build_cmd = container_cmd
push_cmd = container_cmd
match container_cmd[0]:
case "nerdctl":
if args.debug:
container_cmd.append("--debug-full")
build_cmd.extend(["-n", args.namespace, "build"])
push_cmd.extend(["-n", args.namespace, "push"])
build_cmd = container_cmd + ["-n", args.namespace, "build"]
push_cmd = container_cmd + ["-n", args.namespace, "push"]
case "docker":
if args.debug:
container_cmd.extend(["-D", "-l", "debug"])
build_cmd.extend(["buildx", "build"])
build_cmd = container_cmd + ["buildx", "build"]
if args.repo is not None:
build_cmd.append("--push")
case _:
Expand Down Expand Up @@ -311,6 +309,7 @@ def main() -> None:
job_set: Dict[str, JobQueue] = {}
for component in to_do:
spec = build_specs[component]
logging.info(f"Starting pre-build for {component}")
spec.pre_build()
image_name = get_image_name(args.repo, spec.name, args.tag)
job_opts = ["-t", image_name, "-f", "Dockerfile", "."]
Expand All @@ -335,6 +334,7 @@ def main() -> None:
time.sleep(5.0)
# Run the post_build cleanup functions
for component in to_do:
logging.info(f"Starting post-build for {component}")
build_specs[component].post_build()

# Print job summary if output mode is ALL
Expand Down
6 changes: 3 additions & 3 deletions deploy/scripts/sem_dom_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def generate_semantic_domains(
# Languages can be found in the Name element
for sub_elem in elem:
lang, name_text = get_auni_text(sub_elem)
logging.info(f"Language code: {lang}")
logging.debug(f"Language code: {lang}")
if lang not in domain_tree:
domain_tree[lang] = {}
if lang not in domain_nodes:
Expand All @@ -305,9 +305,9 @@ def generate_semantic_domains(
prev_domain = get_sem_doms(root, {}, prev_domain)

for lang in domain_nodes:
logging.info(f"Number of {lang} Domains: {len(domain_nodes[lang])}")
logging.debug(f"Number of {lang} Domains: {len(domain_nodes[lang])}")
for lang in domain_tree:
logging.info(f"Number of {lang} Tree Nodes: {len(domain_tree[lang])}")
logging.debug(f"Number of {lang} Tree Nodes: {len(domain_tree[lang])}")
if not flatten_questions:
SemanticDomainFull.flatten_questions = False
write_json(output_dir)
Expand Down
4 changes: 2 additions & 2 deletions deploy/scripts/setup_files/collector_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ useGOMEMLIMIT: true
resources:
requests:
cpu: 25m
memory: 256Mi
memory: 128Mi
limits:
memory: 512Mi
memory: 128Mi
3 changes: 2 additions & 1 deletion deploy/scripts/setup_files/combine_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ profiles:

# Set of charts
# The set of charts defines properties for each of the charts listed in the profiles above.
# There are 2 keys for each chart:
# There are 3 keys for each chart:
# namespace: the namespace where helm should install the chart. Note that the namespace needs to be
# created beforehand
# install_langs: add font support for languages specified beyond the defaults
# secrets: a list of secrets that are required for each chart. Each secret contains:
# config_item: the name of the configuration value that is referenced in the chart's template files
# env_var: the name of the environment variable that holds the value for the config_item.
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
"deleteAnalysisLanguage": "Delete this analysis language",
"getGlossLanguages": "Find all language codes used in the current data",
"updateVernacularLanguageNameFailed": "Failed to update vernacular language name",
"updateVernacularLanguageNameSuccess": "Vernacular language updated!",
"addAnalysisLanguageFailed": "Failed to add analysis language",
"makeDefaultAnalysisLanguageFailed": "Failed to make default analysis language",
"deleteAnalysisLanguageFailed": "Failed to delete analysis language",
Expand Down
8 changes: 7 additions & 1 deletion src/components/ProjectSettings/ProjectLanguages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export default function ProjectLanguages(
setAdd(false);
setLangsInProj("");
setNewLang(newWritingSystem());
setChangeVernName(false);
};

const updateVernacularName = async (): Promise<void> => {
Expand All @@ -158,7 +159,12 @@ export default function ProjectLanguages(
};
await props
.setProject({ ...props.project, vernacularWritingSystem })
.then(() => resetState())
.then(() => {
resetState();
toast.success(
t("projectSettings.language.updateVernacularLanguageNameSuccess")
);
})
.catch((err) => {
console.error(err);
toast.error(
Expand Down

0 comments on commit 6577f59

Please sign in to comment.