Skip to content

Commit

Permalink
Merge branch 'master' into users-gql
Browse files Browse the repository at this point in the history
* master:
  Skip bad latest tenacity release to fix CI (#4003)
  Bump debian from bullseye-20240513-slim to bullseye-20240612-slim in /lambdas/thumbnail (#4000)
  Use `meta.validating` instead of manually control state (#3994)
  • Loading branch information
nl0 committed Jun 17, 2024
2 parents 96859fe + 988bc30 commit faae2b4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion api/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def run(self):
'jsonlines==1.2.0',
'PyYAML>=5.1',
'requests>=2.12.4',
'tenacity>=5.1.1',
'tenacity>=5.1.1,!=8.4.0',
'tqdm>=4.32',
'requests_futures==1.0.0',
'jsonschema>=3,<5',
Expand Down
14 changes: 6 additions & 8 deletions catalog/app/containers/Bucket/PackageDialog/FilesInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,6 @@ interface FilesInputProps {
onChange: (value: FilesState) => void
}
className?: string
disabled?: boolean
errors?: Record<string, React.ReactNode>
meta: RF.FieldMetaState<FilesState> & { initial: FilesState }
onFilesAction?: (
Expand Down Expand Up @@ -1361,7 +1360,6 @@ interface FilesInputProps {
export function FilesInput({
input: { value, onChange },
className,
disabled = false,
errors = {},
meta,
onFilesAction,
Expand Down Expand Up @@ -1391,13 +1389,13 @@ export function FilesInput({
}
}

const submitting = meta.submitting || meta.submitSucceeded
const disabled = meta.submitting || meta.submitSucceeded || meta.validating
const error =
meta.submitFailed && (meta.error || (!meta.dirtySinceLastSubmit && meta.submitError))

const refProps = {
value,
disabled: disabled || submitting,
disabled,
initial: meta.initial,
onChange,
onFilesAction,
Expand Down Expand Up @@ -1509,7 +1507,7 @@ export function FilesInput({
<Header>
<HeaderTitle
state={
submitting || disabled // eslint-disable-line no-nested-ternary
disabled // eslint-disable-line no-nested-ternary
? 'disabled'
: error // eslint-disable-line no-nested-ternary
? 'error'
Expand Down Expand Up @@ -1617,12 +1615,12 @@ export function FilesInput({

<DropzoneMessage error={error && (errors[error] || error)} warn={warn} />
</Contents>
{(submitting || disabled) && <Lock progress={totalProgress} />}
{disabled && <Lock progress={totalProgress} />}
</ContentsContainer>
<div className={classes.actions}>
<M.Button
onClick={open}
disabled={submitting || disabled}
disabled={disabled}
className={classes.action}
variant="outlined"
size="small"
Expand All @@ -1632,7 +1630,7 @@ export function FilesInput({
{isS3FilePickerEnabled ? (
<M.Button
onClick={handleS3Btn}
disabled={submitting || disabled}
disabled={disabled}
className={classes.action}
variant="outlined"
size="small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ function PackageCreationForm({
[nameWarning, nameExistence],
)

const [filesDisabled, setFilesDisabled] = React.useState(false)
const onFormChange = React.useCallback(
({ dirtyFields, values }) => {
if (dirtyFields?.name) handleNameChange(values.name)
Expand All @@ -452,11 +451,9 @@ function PackageCreationForm({
const hashihgError = delayHashing && FI.validateHashingComplete(files)
if (hashihgError) return hashihgError

setFilesDisabled(true)
const entries = filesStateToEntries(files)
const errors = await validateEntries(entries)
setEntriesError(errors || null)
setFilesDisabled(false)
if (errors?.length) {
return 'schema'
}
Expand Down Expand Up @@ -632,7 +629,6 @@ function PackageCreationForm({
validationErrors={
submitFailed ? entriesError : PD.EMPTY_ENTRIES_ERRORS
}
disabled={filesDisabled}
/>
)}

Expand Down
2 changes: 1 addition & 1 deletion lambdas/thumbnail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG FUNCTION_DIR="/function"

FROM debian:bullseye-20240513-slim@sha256:0e75382930ceb533e2f438071307708e79dc86d9b8e433cc6dd1a96872f2651d as base-image
FROM debian:bullseye-20240612-slim@sha256:acc5810124f0929ab44fc7913c0ad936b074cbd3eadf094ac120190862ba36c4 as base-image

FROM base-image as build-image

Expand Down

0 comments on commit faae2b4

Please sign in to comment.