| Age | Commit message (Collapse) | Author |
|
|
|
Refs #4387
|
|
|
|
Refs #4386
|
|
Refs #4385
|
|
Refs #4384
|
|
Refs #4383
|
|
|
|
|
|
|
|
|
|
#4257 #4258
|
|
regarding the functional scope of the current organozation
|
|
Refs #4237
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Import model clean up code and add specs
|
|
|
|
It isn't used any more so get rid of it. I had forgotten to remove the
argument from the place it was actually called in the code when I did
this previously in 61817b2e7828455021bcec66e2d6da70f879e1c4. Actually,
Alban hadn't modified the method signature in the code he gave me, I
shouldn't have committed that change as him, my bad.
The argument was added back in because it caused `#notify_parent` to
fail. Update that method so it makes the correct method call.
|
|
|
|
|
|
|
|
Clean up this section a tiny bit. Should function the same way as
before.
|
|
Previously we were only updating the `ended_at` field when the import
had a 'successful' status. But there are other statuses that indicate
the import finished, and the `ended_at` field should be updated in these
cases also.
Committing what I have now which seems to work but I didn't write specs
for it because it was a pain to test (what with creating a child, etc.).
The `#update_status` method should be refactored to make testing the
`ended_at` update easier.
This needs to be committed without specs now because I'm off to go to a
client meeting and this work/branch is blocking QA of imports both
internally and externally. So I guess doing things right comes later.
That is to say, probably a lot later. Who knows.
|
|
A bunch of things that need to be written to get this in proper working
order.
|
|
This method is no longer used, now that we have Alban's `#update_status`
method.
Originally this was supposed to be used to determine if the import was
finished or not. Now, the parent import status field update doesn't
depend on it, and we can use the `Referential#ready` field to determine
whether or not to display the import in the interface.
|
|
After handling a status update of the parent import, if the parent
import finished, we should update its referential to `ready: true` so
that the referential actually gets displayed on the page.
|
|
Instead of just looking at the given child, the parent import status is
now determined by checking all children and assigning a value based on
their status.
This also updates the `current_step` (which was previously handled by
the `WorkbenchImportWorker`, remind me to remove it from where), and the
`ended_at` time. I think `ended_at` should probably be updated in both
successful and failed cases. Will have to make that update.
|
|
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Robert recommended that this file should not live in concerns. Move it
somewhere else (maybe lib/ ?).
|
|
These tests were failing:
1) NetexImport POST netex_imports with correct credentials and incorrect request behaves like illegal attributes missing file does not succeed
Failure/Error: expect( json_response_body['errors'][bad_attribute.to_s] ).not_to be_empty
TypeError:
no implicit conversion of String into Integer
Shared Example Group: "illegal attributes" called from ./spec/requests/api/v1/netex_import_spec.rb:90
# ./spec/requests/api/v1/netex_import_spec.rb:77:in `[]'
# ./spec/requests/api/v1/netex_import_spec.rb:77:in `block (6 levels) in <top (required)>'
# -e:1:in `<main>'
2) NetexImport POST netex_imports with correct credentials and incorrect request name already taken behaves like illegal attributes missing name does not succeed
Failure/Error: expect( json_response_body['errors'][bad_attribute.to_s] ).not_to be_empty
TypeError:
no implicit conversion of String into Integer
Shared Example Group: "illegal attributes" called from ./spec/requests/api/v1/netex_import_spec.rb:96
# ./spec/requests/api/v1/netex_import_spec.rb:77:in `[]'
# ./spec/requests/api/v1/netex_import_spec.rb:77:in `block (6 levels) in <top (required)>'
# -e:1:in `<main>'
The problem was caused by the fact that the error messages come back
from `ErrorFormat` as an array of hashes, which contain a single key
corresponding to the invalid field.
Instead, the error messages should be returned as a single hash with a
bunch of keys corresponding to the invalid fields.
This change gets the above tests to pass.
|
|
|
|
While testing imports with Alban, we saw that this request was blocking,
not asynchronous. The Java application apparently didn't figure that it
should close HTTP connections before handling a long-running import job.
In order to get around that on the Rails appliation side, Alban
suggested putting the request in a thread. Works like a charm, and we
respond in a sensible amount of time.
|
|
Refs #4280
|
|
Debugging Java Integration (ZipService -> HTTPService -> Object Creation)
- Created an ErrorFormat concern to see what went wrong in the HTTP call
as so many things can go wrong due to:
* Timeout Issues
* Illegal database setup or cleaning before tests
|
|
|