Hi :wave: Any ideias about this issue? ```{ "e...
# talk-hydra
r
Hi 👋 Any ideias about this issue?
Copy code
{
  "errors": {
    "migrations": "migrations have not yet been fully applied: [{State:Applied Version:20190100000001000000 Name:client} {State:Applied Version:20190100000002000000 Name:client} {State:Applied Version:20190100000003000000 Name:client} {State:Applied Version:20190100000004000000 Name:client} {State:Applied Version:20190100000005000000 Name:client} {State:Applied Version:20190100000006000000 Name:client} {State:Applied Version:20190100000007000000 Name:client} {State:Applied Version:20190100000008000000 Name:client} {State:Applied Version:20190100000009000000 Name:client} {State:Applied Version:20190100000010000000 Name:client} {State:Applied Version:20190100000011000000 Name:client} {State:Applied Version:20190100000012000000 Name:client} {State:Applied Version:20190100000013000000 Name:client} {State:Applied Version:20190100000014000000 Name:client} {State:Applied Version:20190200000001000000 Name:jwk} {State:Applied Version:20190200000002000000 Name:jwk} {State:Applied Version:20190200000003000000 Name:jwk} {State:Applied Version:20190200000004000000 Name:jwk} {State:Applied Version:20190300000001000000 Name:consent} {State:Applied Version:20190300000002000000 Name:consent} {State:Applied Version:20190300000003000000 Name:consent} {State:Applied Version:20190300000004000000 Name:consent} {State:Applied Version:20190300000005000000 Name:consent} {State:Applied Version:20190300000006000000 Name:consent} {State:Applied Version:20190300000007000000 Name:consent} {State:Applied Version:20190300000008000000 Name:consent} {State:Applied Version:20190300000009000000 Name:consent} {State:Applied Version:20190300000010000000 Name:consent} {State:Applied Version:20190300000011000000 Name:consent} {State:Applied Version:20190300000012000000 Name:consent} {State:Applied Version:20190300000013000000 Name:consent} {State:Applied Version:20190300000014000000 Name:consent} {State:Applied Version:20190400000001000000 Name:oauth2} {State:Applied Version:20190400000002000000 Name:oauth2} {State:Applied Version:20190400000003000000 Name:oauth2} {State:Applied Version:20190400000004000000 Name:oauth2} {State:Applied Version:20190400000005000000 Name:oauth2} {State:Applied Version:20190400000006000000 Name:oauth2} {State:Applied Version:20190400000007000000 Name:oauth2} {State:Applied Version:20190400000008000000 Name:oauth2} {State:Applied Version:20190400000009000000 Name:oauth2} {State:Applied Version:20190400000010000000 Name:oauth2} {State:Applied Version:20190400000011000000 Name:oauth2} {State:Applied Version:20200521071434000000 Name:consent} {State:Applied Version:20200527215731000000 Name:client} {State:Applied Version:20200527215732000000 Name:client} {State:Applied Version:20200819163013000000 Name:add_client_id_subject_idx_to_access_and_refresh} {State:Pending Version:20200913192340000000 Name:initial_sqlite} {State:Pending Version:20201110104000000000 Name:drop_uq_oauth2} {State:Pending Version:20201116133000000000 Name:set_null_time} {State:Pending Version:20210928155900000000 Name:support_amr_claim} {State:Pending Version:20211226155900000000 Name:grant_jwk_bearer} {State:Pending Version:20211226156000000000 Name:dynamic_registration}]"
  }
}
h
wait a few minutes and try again
r
@high-optician-2097 thanks for reaching out but that didn't work. If I use a Postgres DB as hydra’s DSN migrations are all applied successfully but if I use a MySQL 8.0.23 DB as it's DSN it always fails (without these migrations hydra is never ready - /health/ready)
h
Ah I see - you can check the migrator log for errors!
r
When you say ‘migrator log’ you are referring to
migrate sql
command log right?
h
exactly
r
Hi @high-optician-2097 I discovered something really weird.. after some attempts I was able to obtain ‘successfully applied migrations’ log, however when I try to create a client it always fail because
registration_access_token_signature
column does not exist in hydra_client table These issues only occur when using a mysql DB but not when using ‘memory’ or ‘postgres’. Can I just update this table schema? How can I know that all remaining tables have the proper schema?
h
I suggest deleting the DB and trying fresh
r
Ok. will do. thanks
I deleted twice and still I get ‘migrations applied successfully’ and hydra_client table still doesn’t have that column
Hey 👋 @high-optician-2097 After n attempts I’ve decided to compare postgres and mysql DSN schemas after respective migrations I’ve noticed the following differences: hydra_oauth2_authentication_request_handled -> missing column amr [text] hydra_client -> missing column registration_access_token_signature [varchar(128)] hydra_oauth2_consent_request -> missing column amr [text] hydra_oauth2_trusted_jwt_bearer_issuer -> missing entire table ( id uuid, issuer varchar(255), subject varchar(255), “scope” text, key_set varchar(255), key_id varchar(255), created_at timestamp, expires_at timestamp )
Any ideas? I have version v1.11.7 deployed
I’m also using Ory Keto with same DSN without any issues so far
h
Have you searched on github? I think there were similar issues people had
And in the end it was some obscure mysql setting
r
Hi, @high-optician-2097 yes I’ve searched for similar reports on github. These two were the most similar I could find https://github.com/ory/hydra/issues/2024 https://github.com/ory/hydra/issues/3144 I’ve been checking our hydra logs and it seems that migration process finishes with ‘success’. despite stopping its execution after initial_sqlite step (Error 1065: query was empty)
I’m saying this because
amr
is also one of the missing columns (as I’ve mentioned above) and this log shows that
support_amr_claim
is pending
In this one you can see the following steps we’ve got until logging
Successfully applied migrations!
h
It’s probably best if you open a github discussion with as many details as possible. We have constant e2e tests running against MySQL and everything passes, so it’s most likely an issue with your env. It’s really hard to follow up on this stuff on slack 🙂
👍 1
r
Okok thanks for your feedback 💪 Hope this issue https://github.com/ory/hydra/issues/3149 can help us
Hi @high-optician-2097 hope this message finds you well, I was wondering if it would be possible to get your feedback regarding this report https://github.com/ory/hydra/issues/3149 Thanks 👍
h
Hey Jose, thank you, I sae the GH comment. I am currently traveling and don't have time to look into it. There are some other folks with AWS MySQL issues in Hydra, have you seen these issues?
r
Ok thanks, yes we’d already looked into it. For now we’ll just use native MySQL because it works. Will Ory products (in this case, Hydra’s DSN) ever support Vitess databases based on its roadmap since other members also want to use it?
h
Not sure, if Vitess is compatible with regular MySQL yes, but we can't differentiate between mysql and vitess and will probably always favor native mysql over dialects