feat: Web Based Validator#1317
Conversation
|
|
732a4ba to
6b97a51
Compare
davidgamez
left a comment
There was a problem hiding this comment.
praise: Great work! I added few questions and comments in-line before approval.
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Body.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/CreateJobBody.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Show resolved
Hide resolved
web/service/src/test/java/com/mobilitydata/gtfsvalidator/web/service/MainTests.java
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Body.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Body.java
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,19 @@ | |||
| /*! | |||
| * Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com | |||
There was a problem hiding this comment.
General question: is it typical to have so much fontawesome checked directly into our own repo? I'm surprised this isn't made available as a library package of some kind.
There was a problem hiding this comment.
We looked into this, and the current deployment is what fontawesome recommends.
This has the additional potential performance benefit that the fontawesome library may already be cached by the browser.
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/CreateJobBody.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/CreateJobBody.java
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/UploadFileResponse.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/Main.java
Outdated
Show resolved
Hide resolved
| data.url = url | ||
| } | ||
|
|
||
| const xhr = new XMLHttpRequest(); |
There was a problem hiding this comment.
Are you targeting a specific browser version set? Wondering if you can get away with fetch here.
There was a problem hiding this comment.
We ran into some issues with fetch during testing. The upload request to GCS has to be configured in a very specific way to be accepted. I'd prefer to leave this as is.
There was a problem hiding this comment.
Very excited about this @KClough! I've shared some comments from a QA perspective on the UI. I also tested 8 feeds from a mix of our acceptance tests and Cal-ITP's original validator review, for both ZIP and URL feeds:
-
When I generate 1 URL feed report, it works. When I try to generate another URL feed report in the same browser session, it fails and I get an error when I click "Open Report". Tested in Chrome and Firefox.
Here are 2 links I tested with: https://static.opendata.metlink.org.nz/v1/gtfs/full.zip and http://data.trilliumtransit.com/gtfs/victorville-ca-us/victorville-ca-us.zip -
stop_without_stop_timeseems to be missing a details accordion on the rules page.
I assume this is an issue with the web UI report, since it does appear in the RULES.md -
When trying to validate https://download.gtfs.de/germany/nv_free/latest.zip, the web UI stayed running for 20 minutes in the validator web UI without generating a report, whereas it loaded in 5 minutes with the desktop app. Would be curious on @davidgamez and @bdferris's perspective on handling very large aggregate feeds here too, and if there's any quick wins to improve performance.
...rc/main/java/org/mobilitydata/gtfsvalidator/web/service/controller/ValidationController.java
Outdated
Show resolved
Hide resolved
...service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/ValidationHandler.java
Outdated
Show resolved
Hide resolved
...service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/ValidationHandler.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/StorageHelper.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/StorageHelper.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/StorageHelper.java
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/StorageHelper.java
Outdated
Show resolved
Hide resolved
web/service/src/main/java/org/mobilitydata/gtfsvalidator/web/service/util/StorageHelper.java
Outdated
Show resolved
Hide resolved
|
I think this is generally LGTM. I'm going to let @davidgamez give the ultimate review approval, since this will eventually be his free puppy to own and maintain. |
I connected with @KClough and the pending items will be addressed in follow-up PRs. We will be creating separate issues to keep the scope reduced per PR. |
Confirmed with Emma in slack that these changes have been made.
* feat: add web api service * chore: move web service to subfolder * feat: add web client * feat: clear form when report is ready * feat: add footer with credits * feat: improve button/form styling * feat: add data retention info to rooter * fix: don't auto-upload when using form input * feat: add SelectField component * feat: add language selector * chore: reorganize imports * fix: actually upload file when using form * wip: add country code + url support * chore: add start script alias * feat: add markdown and some add'l postcss features * feat: reorganize css * feat: improve component event handling and data flow * feat: update form events and country code handling * feat: mock up sourceUrl and improve errors * feat: add local rules page * fix: remove incorrect danging comma from css * fix: add |local to in-page transitions to prevent awkward nav * fix: inject host to URLs in rules.md * Fix country code loading/saving * Update docs to include deploy command * Fix Dockerfile jar reference * Update web client to properly pass country code + url * Update copy + add github footer * Add rules page and update links * Fix markdown errors * Add feedback button to validator web client * Add GCS lifecycle documentation * Tweak scroll on hash change behavior * Add build step for copying RULES.md to web client * fix: first pass on pr feedback * Update README's for local dev * fix: reset jobId on each run * fix: Move detected region to top of dropdown, make region optional * fix: attempting to make region optional on service * fix: spring boot tests running due to missing credential files * feat: tweak jvm params * feat: tweak jvm params - try 12gb for jvm * refactor: extract StorageHelper.java * refactor: cleanup and use JSON serialization. * refactor: further refactoring to increase separation of concerns. * add class & method comments * formatting * Use request/response object and JSON serialization * further class documentation * comments enjoy a good formatting, as well * PR feedback * PR feedback * rename method, inline variable * Autowire StorageHelper * move method back onto controller * skip directories * refactoring --------- Co-authored-by: Ryon Coleman <[email protected]> Co-authored-by: Brian Donahue <[email protected]> Co-authored-by: David Gamez Diaz <[email protected]>
Summary:
Resolves #1184
Expected behavior:
Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anythingTODO: