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

Admin: domain history returns internal error for domains with history #1489

Closed
vohmar opened this issue Jan 22, 2020 · 2 comments
Closed

Admin: domain history returns internal error for domains with history #1489

vohmar opened this issue Jan 22, 2020 · 2 comments
Assignees
Labels

Comments

@vohmar
Copy link
Contributor

vohmar commented Jan 22, 2020

If a domain is registered prior to dec 2015 ie it does not have registration record in current registry db, internal error is returned when admin tries to access history of that domain (/admin/domains/ID/domain_versions). It cannot return something it does not have but the history present in the new registry should be available.

@vohmar vohmar added the bug label Jan 22, 2020
@yulgolem yulgolem self-assigned this Jan 23, 2020
yulgolem added a commit that referenced this issue Jan 24, 2020
Concern method #all_versions_for(ids, time) tried to create model instance from
history and raises an exception when in history object there are some columns
which are ignored in model at the moment.

This patch removes ignored columns from data used to create a new inctance.

See #1489
@yulgolem
Copy link
Contributor

Error log: https://gist.github.com/ratM1n/2bc344fbb0c43cf3e39f73cecd25cae1

Request from staging DB:

SELECT distinct on (item_id) log_nameservers.* FROM "log_nameservers" WHERE ("log_nameservers"."item_id" IN (85805, 85804, 85803, 85802) OR "log_nameservers"."item_id" IS NULL) AND ("log_nameservers"."created_at" < '2019-11-07 10:33:56.720042') ORDER BY "log_nameservers"."item_id" ASC, "log_nameservers"."created_at" DESC, "log_nameservers"."id" DESC

Result:

-[ RECORD 1 ]--+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id             | 827176
item_type      | Nameserver
item_id        | 85804
event          | destroy
whodunnit      | 17
object         | {"id":85804,"hostname":"d.tld.ee","ipv4":["195.43.87.78"],"created_at":"2013-02-27T16:35:13.969+02:00","updated_at":"2013-09-19T15:57:50.088+03:00","ipv6":[],"domain_id":34252,"creator_str":"eedirect","updator_str":"Elisa Eesti AS","legacy_domain_id":317076,"hostname_puny":"d.tld.ee"}
object_changes | 
created_at     | 2019-11-07 10:33:55.753342
session        | 2019-11-07 02:20:04
children       | 
uuid           | 

@vohmar
Copy link
Contributor Author

vohmar commented Jan 27, 2020

fixed by #1491

@vohmar vohmar closed this as completed Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants