-
Notifications
You must be signed in to change notification settings - Fork 24
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 uploading zipped tiff (should set needsConversion=true) #7856
Conversation
@@ -513,7 +513,7 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> { | |||
} | |||
// We return here since not more than 1 zip archive is supported anyway. This is guarded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// We return here since not more than 1 zip archive is supported anyway. This is guarded | |
// We break here since not more than 1 zip archive is supported anyway. This is guarded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rephrase entire comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works 🎉
I tested all tiff formats included in: https://www.notion.so/scalableminds/Test-Datasets-c0563be9c4a4499dae4e16d9b2497cfb?pvs=4#7db7f26b5e494352a8153ab073487ab3 as well as wkw.
Just left one question :)
firstExploredDatasource <- dataSources.headOption.toFox | ||
dataSource = GenericDataSource[DataLayer](dataSourceId, combinedLayers, firstExploredDatasource.scale) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the advantage of this change?
To me the code semantically reads the same. Just that the testing for whether dataSources
has atleast a one item is more explicit. Or am I misunderstanding something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
head
on an empty list raises an exception, which bypasses some of our error handling. headOption.toFox creates a Fox.failure that will yield nicer error messages in our context.
I’d say head
is always a codesmell in our codebase, unless it is directly wrapped in a tryo (but then headOption should always be possible instead) or we are absolutely certain that the list will not be empty.
Fixes two bugs in dataset upload
containsMatchingFile
was not used)Steps to test:
yarn enable-jobs
(no actual worker needed though)Issues: