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

Check if duplicate trends error crops up in 5.7 mysql version #4277

Closed
wants to merge 3 commits into from

Conversation

vatbq
Copy link
Contributor

@vatbq vatbq commented Dec 12, 2018

Fixes #4266
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@vatbq
Copy link
Contributor Author

vatbq commented Dec 12, 2018

@jywarren @milaaraujo Ready! waiting now

@vatbq
Copy link
Contributor Author

vatbq commented Dec 12, 2018

OK, the error is not about the test. It says that can found mysql:5.7
screen shot 2018-12-12 at 2 34 01 am
Maybe I'm doing something wrong. What do you think? @jywarren @milaaraujo

@milaaraujo
Copy link
Collaborator

I think you should use mysql:5.7 not mariadb:5.7.

@vatbq
Copy link
Contributor Author

vatbq commented Dec 12, 2018

Let's check now

@milaaraujo
Copy link
Collaborator

The command "docker-compose exec web bash -c "rake db:setup"" failed and exited with 1 during .

@jywarren, do you know what is happening here? :/

@jywarren
Copy link
Member

Hmm...

Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")
Couldn't create 'plots' database. Please check your configuration.
rake aborted!
Mysql2::Error::ConnectionError: Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")

@jywarren
Copy link
Member

Hmm, maybe we need mysql-5.7-trusty as in this comment: travis-ci/travis-ci#5122 (comment)

Obscure, but the last comment about that was Jan 2018, and more docs here: https://docs.travis-ci.com/user/database-setup/#mysql-57

It says we may need these in travis.yml:

addons:
  apt:
    sources:
      - mysql-5.7-trusty
    packages:
      - libmysqlclient-dev
      - libmysqlclient20
      - mysql-community-client
      - mysql-common
      - mysql-community-server

@jywarren
Copy link
Member

One thing to consider, although it may add considerable complexity, might be to have Travis run all tests in 3 different builds, one for mysql, one for mariadb and one for sqlite -- this is described here: https://docs.travis-ci.com/user/database-setup/#multiple-database-builds

@jywarren
Copy link
Member

Let's think about that after resolving this issue.

@vatbq
Copy link
Contributor Author

vatbq commented Dec 14, 2018

Ok, I'll to add that lines in .travis.yml and just wait

@vatbq
Copy link
Contributor Author

vatbq commented Dec 15, 2018

@jywarren @milaaraujo

@jywarren
Copy link
Member

Hmm, this still shows Mysql2::Error::ConnectionError: Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")

@icarito no rush here but do you have any idea why it won't find mysql or connect to it? We're looking to see if our latest code still runs on mysql 5.7, and considering expanding Travis tests to account for this too. Thanks!

@milaaraujo
Copy link
Collaborator

We're looking to see if our latest code still runs on mysql 5.7, and considering expanding Travis tests to account for this too.

Not sure if it is a good idea to merge a change like this, because right now a lot of tests fail running mysql.

@jywarren
Copy link
Member

That's fine -we don't have to merge this anytime soon, but I think it's something we might pursue longer-term to keep our code flexible and compatible. We could think of it as a long-term maintenance goal; I'll open an issue accordingly to track this.

Thanks for your help, everyone! I do think it'd get us one step closer if anyone could figure out what's going on with the connection to MySQL, and we could then build on that to re-achieve MySQL compatibility and run our tests on both db platforms, sometime in the future. Let's leave this open in the meantime.

@SidharthBansal
Copy link
Member

As the person is inactive for more than a month, I am closing the PR. In case you want to push changes please feel free to open a new PR OR reopen this PR and add additional changes to it.
Thanks for contributing on Public Lab
cc @jywarren @gauravano

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants