-
Notifications
You must be signed in to change notification settings - Fork 655
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 ArcGIS import when there are no features #16322
Fix ArcGIS import when there are no features #16322
Conversation
This pull request has been linked to Clubhouse Story #164052: [wnc] ArcGIS import fails due to timeout. |
7fbe0b9
to
60a0eea
Compare
Acceptance in staging ✅Import ArcGIS feature server without dataWe import a feature server we know does not have data: The import succeeds: And as a result creates an empty dataset: Import ArcGIS feature server with dataWe select a feature server we know has data: And we can see the resulting rows after the import succeeds: |
@@ -125,7 +125,15 @@ def run_import! | |||
log.append("Running on server #{server} with PID: #{Process.pid}") | |||
|
|||
begin | |||
success = !!dispatch |
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.
This is just a cleanup I did along the way, no behavior changes in this file
@@ -29,7 +29,7 @@ def @data_import.data_source=(filepath) | |||
end | |||
|
|||
@data_import.data_source = file_name | |||
@data_import.send :dispatch | |||
@data_import.run_import! |
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.
Better call the public API instead of a private method
@@ -123,6 +123,14 @@ def timed_log(s) | |||
end | |||
end | |||
|
|||
def build_empty_initial_stream |
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.
This is the key to the issue: I have to return an empty list of features in order for the dataset to be created with 0 rows
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.
LGTM 🚀
Fixes https://app.clubhouse.io/cartoteam/story/164052/wnc-arcgis-import-fails-due-to-timeout