question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Record Sorting Requirements

See original GitHub issue

Am attempting to load a large zone and keep getting:

yaml.constructor.ConstructorError: keys out of order: ab, a

I’ve debugged it down to the ordering of the records in the YAML input file. The following provides the error:

---
ab:
    type: A
    values: [1.1.1.1]
a:
    type: A
    values: [2.2.2.2]

What sorting standard should the YAML keys be treated with before being fed to OctoDNS?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rosscommented, Jun 20, 2017

And whether you list them in “order” of the record or just some random order, I’m surprised it kicks it with an error.

That’s just the validations that we put on things internally so that the records are consistently setup. In an ideal world it probably would sort them in the order the RFC talks about them, that would be fine too, just not what was implemented for the sake of time (it’d also be tougher to do with the way the the yaml sorting can be hooked in.)

I’m going to re-open this issue for tracking improvements to the sorting stuff, but I have no ETA on when that might happen. Unfortunately pretty low priority compared to some of the other stuff I’d like to see land.

  • Look at using one of the established natural sort order modules, didn’t find one when I wrote my version several years ago and now that there are OSS’d ones might as well use them
  • Look at making sorting optional altogether. Related to #3
  • Evaluate what it would take to sort the record keys in RFC order. Related to #4 which would better adhere to RFC naming as well
0reactions
rosscommented, Jun 20, 2017

Look at using one of the established natural sort order modules, didn’t find one when I wrote my version several years ago and now that there are OSS’d ones might as well use them Look at making sorting optional altogether. Related to #3

These two are in https://github.com/github/octodns/pull/70

Evaluate what it would take to sort the record keys in ~RFC order. Related to #4 which would better adhere to RFC naming as well

Not going to address this one now. Will make note of it in the #4 to potentially be addressed when that work happens.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access 2016: Sorting and Filtering Records - GCF Global
To sort records: · Select a field you want to sort by. · Click the Home tab on the Ribbon, and locate the...
Read more >
Record Sorting Requirements · Issue #43 · octodns ... - GitHub
It requires things to be sorted alphabetically, so the a record should come before ab . Same goes for the 2nd level, though...
Read more >
Sorting & Record Ordering - Overview - Airtable Support
While in a view, you can sort your records so that they appear in a particular order according to the values in specific...
Read more >
Records Management System: Storing & Sorting | softengi.com
In Records Management System, companies, authority bodies, and individuals can keep and organize all types of data files that they consider important.
Read more >
Medical Record Organization – Sorting & Indexing the Records
Sorting and subsequent indexing helps to assess the completeness of the required documents. It also checks whether the testimony given by the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found