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
Duplicate records due to .group() changes for gitpod mysql fixes #8177
Comments
|
Changes to |
Changes to https://stable.publiclab.org/dashboard So, I'm going to try reverting the /people page one. We may have to rework that query. Also noting Line 18 in daeb096
|
And noting we still don't have a solution for these: Because changing them to |
OK, now that #8178 is done, /people is broken again in GitPod. But let's try to solve it without causing duplicates!
|
Very strangely, I found that, in GitPod, in the rails console, I was able to run the whole Rails statement and it completed without an error:
Very strange! When you run a diff on the generated SQL from what I'm running in the console vs. what is rendering on the Rails app page at the
And yet, the @icarito suggested maybe the environment with 🤯 😭 You can test this yourself by opening https://gitpod.io/#https://github.com/publiclab/plots2/ -- the query itself is on line 142 of |
Hi,
in database.yml.gitpod and also directly in database.yml, and restarted the workspace, but I still see from the logs that something is issueing this command: Which is seems to be resetting the value. Do you know where this could be happening? |
Just a thought -- we could just make all the plots2/app/controllers/tag_controller.rb Line 22 in 5a2155a
|
I thought these would now be resolved in GitPod due to #8856, but /people is still showing:
|
I tried following @icarito's suggestion for mysql -e "SET @@global.sql_mode=(SELECT REPLACE(@@global.sql_mode, 'TRADITIONAL', ''));" So that didn't work -- so i tried setting the full string but I got $ mysql -e "SET @@global.sql_mode='NO_AUTO_CREATE_USER,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';"
ERROR 1231 (42000) at line 1: Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' @icarito i think we can try one of your suggestions by changing this line in GitPod now: Line 12 in d38da1c
Can you suggest a different version of this line? Thank you!! Update: just thought of this -- the above line is test-able within GitPod, actually so it's hopefully faster to iterate on to try out than other ways of setting |
Otherwise we can make a new attempt to turn off grouping in development mode, or just in GitPod maybe... following the example in https://github.com/publiclab/plots2/pull/8499/files but with our new ok that didn't work -- #8979 |
Another option is to switch to MariaDB in GitPod -- like how we did here: #8874 |
We ultimately solved this by fixing the syntax of the core SQL query itself! There may be some leftover queries to fix but this method worked. And now we should be more compatible with mysql/mariadb versions! |
* Change ANY_VALUE aggregate function to MariaDB compatible MAX https://stackoverflow.com/a/54173805 post #8499 #9000 #8177 #8251 * Update users_controller.rb
…lab#9173) * Change ANY_VALUE aggregate function to MariaDB compatible MAX https://stackoverflow.com/a/54173805 post publiclab#8499 publiclab#9000 publiclab#8177 publiclab#8251 * Update users_controller.rb
…lab#9173) * Change ANY_VALUE aggregate function to MariaDB compatible MAX https://stackoverflow.com/a/54173805 post publiclab#8499 publiclab#9000 publiclab#8177 publiclab#8251 * Update users_controller.rb
…lab#9173) * Change ANY_VALUE aggregate function to MariaDB compatible MAX https://stackoverflow.com/a/54173805 post publiclab#8499 publiclab#9000 publiclab#8177 publiclab#8251 * Update users_controller.rb
…lab#9173) * Change ANY_VALUE aggregate function to MariaDB compatible MAX https://stackoverflow.com/a/54173805 post publiclab#8499 publiclab#9000 publiclab#8177 publiclab#8251 * Update users_controller.rb
I'm concerned that the expansion of
.group()
calls in #8152 has created some incorrect outcomes.Responding to errors such as:
we expanded the
.group()
terms by a lot:https://github.com/publiclab/plots2/pull/8152/files#diff-4e05ad0d64e6100656b63ad1e78f32c5R141
When doing this in #8048 i realized that doing something similar there (
.group('term_data.name, node.nid, term_data.tid, community_tags.nid, community_tags.uid, community_tags.date, community_tags.created_at, community_tags.updated_at')
in each instance of.group()
intag_controller.rb
) caused tags to show up multiple times (duh!):The text was updated successfully, but these errors were encountered: