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

Hook up GDS SSO #1

Closed
KushalP opened this issue Dec 4, 2012 · 1 comment
Closed

Hook up GDS SSO #1

KushalP opened this issue Dec 4, 2012 · 1 comment

Comments

@KushalP
Copy link
Contributor

KushalP commented Dec 4, 2012

We have a user auth system already implemented. Use it!

@JordanHatch
Copy link
Contributor

This has been done :)

ChrisBAshton added a commit that referenced this issue Dec 9, 2021
MySQL 5.7.5 introduced new behaviour around its
[handling of `GROUP BY` clauses][1]. This change resulted in some
previously valid SQL queries in Release to be deemed invalid and
trigger MySQL errors including this one:

```
Error:
\#per_year#test_: #per_year should return correct data. :
ActiveRecord::StatementInvalid: Mysql2::Error: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'release_test.deployments.created_at' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
    app/models/deployment_stats.rb:18:in `per_year'
    test/unit/deployment_stats_test.rb:53:in `block (2 levels) in <class:DeploymentStatsTest>'
    test/unit/deployment_stats_test.rb:39:in `instance_exec'
    test/unit/deployment_stats_test.rb:39:in `block in create_test_from_should_hash'
```

This change in behaviour can be reverted by setting the `sql_mode`
to `TRADITIONAL`, which is a special '[combination SQL mode][2]'
that excludes `ONLY_FULL_GROUP_BY`.

Some effort was made at first to refactor the problematic SQL queries
to avoid needing to deviate from MySQL's now-default behaviour. However,
the attempts were unsuccessful, and it is therefore more pragmatic to
follow the [convention established in Whitehall][3] to set the SQL
mode to 'traditional'.

[1]: https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
[2]: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-combo
[3]: alphagov/whitehall#6386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants