Skip to content
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

Upgrade Webpack/Webpacker from 3.x to 4.x #604

Closed
DeeDeeG opened this issue Oct 26, 2019 · 8 comments · Fixed by #607
Closed

Upgrade Webpack/Webpacker from 3.x to 4.x #604

DeeDeeG opened this issue Oct 26, 2019 · 8 comments · Fixed by #607
Labels
dependencies Pull requests that update a dependency file packages

Comments

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Oct 26, 2019

Webpack/Webpacker 3.x will probably not be supported anymore at some point, and 4.x is included by default with Rails 6.x

Switching helps us stay on the latest dependencies, and stay current with the direction that Rails is going overall. Staying closer to the direction Rails is going should make it easier to stay on actively supported tech/dependencies.

@btyy77c
Copy link
Contributor

btyy77c commented Dec 15, 2019

I can work on this. Do you also want to upgrade to Rails 6?

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Dec 15, 2019

As the most-active maintainer as of late, I'd say that would be awesome. I'm checking in with longer-standing devs/maintainers on Slack, but I personally don't see why not.

Thank you for the offer! (Will keep you posted if I have any updates to give.)

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Dec 16, 2019

I am able to review this type of PR and land it, so I'm going to say go for it. Thanks again.

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Dec 16, 2019

Do you also want to upgrade to Rails 6?

Yes, I think that would be good, if it proves to not be too much trouble. Only reason why not to (from my perspective) would be performance regressions or bugs/instability. Should be able to catch either during review.

@DeeDeeG DeeDeeG added the dependencies Pull requests that update a dependency file label Dec 16, 2019
@btyy77c
Copy link
Contributor

btyy77c commented Dec 17, 2019

Ok. I'll upgrade webpack first and have a different branch for Rails 6.

I'm having a little trouble testing it. All of my branches are failing (including my develop branch: https://travis-ci.org/btyy77c/refugerestrooms/builds/625295028). I think I may be missing an api key to fully test it.

@btyy77c btyy77c mentioned this issue Dec 17, 2019
5 tasks
@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Dec 18, 2019

I'll be able to take a closer look at this tomorrow. Thank you!

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Dec 18, 2019

All of my branches are failing (including my develop branch

I'm seeing this too. Sometimes Travis CI gets a reproducible failure on our project that doesn't have anything to do with code changes we've made. These failures that come for no traditional "fault" of our own seem to go away on their own, too.

Speculating: If I had to hazard a guess, I'd say it has to do with Puma running with a maximum 4 threads allowed during testing; In production, if I recall correctly, we are running Puma single-threaded (max 1 thread). I'm not personally familiar with how to change this during testing... And it might not be a correct guess. But that's my guess until that gets ruled out....

Edit: Also, there are some dependencies we don't pin, such as the exact yarn, nodejs or Apt package versions we install during the build. These implicitly get the "latest" versions, some pinned to "within a given major version" (like NodeJS). Theoretically the Travis environment might also update, but usually they leave their base image alone for long stretches of time.

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Dec 24, 2019

I tracked down the Travis CI failure by recreating the test conditions manually in Docker.

In summary, the top result for "Mission Creek Cafe" in Google Maps has recently changed, thus breaking our test.

Fuller explanation below, for anyone curious:


(Background information: The Mission Creek Cafe in San Francisco has apparently been closed for some time now. A place called Mission Creek Coffee exists in Washington State. The coffee shop in Washington is now the top result in Google Maps for a generic search for "Mission Creek Cafe." This top result must have changed as of very recently, no earlier than November 1st, when our tests were still passing.)

This test is trying to search for "Mission Creek Cafe" in the search bar, which calls up the Google Maps API's best guess to what location we mean with the search term "Mission Creek Cafe." This now returns a lat/long of the coffee shop in Washington State. (Whereas it used to return the location of the closed coffee shop in San Francisco.)

Google Maps returns a lat/long in Washington, but none of our restrooms in the test db are anywhere near Washington, so the restroom results page is just an empty page. (Our "results view" page simply returns all results within a specific radius of the lat/long passed to it.)

The test expects our testing environment (the CI version of the webapp) to have a result matching our query (effectively a search for restrooms in Washington), but all the restrooms in the testing database are in San Francisco, not Washington.

Thus, the text-match search for the words "Mission Creek Cafe" on the page fails. The test would pass if the "Mission Creek Cafe" restroom entry were visible, but no results are visible at all.

(Trivia note: This sort of thing was briefly looked into in #303 and #311.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants