Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Sort resources semantically to tighten up reconciliation#867

Merged
shomron merged 1 commit intoksonnet:masterfrom
shomron:issue-850-sort-order
Sep 20, 2018
Merged

Sort resources semantically to tighten up reconciliation#867
shomron merged 1 commit intoksonnet:masterfrom
shomron:issue-850-sort-order

Conversation

@shomron
Copy link
Collaborator

@shomron shomron commented Sep 19, 2018

Closes #850

Signed-off-by: Oren Shomron shomron@gmail.com

@shomron shomron requested a review from a team September 19, 2018 15:49
@coveralls
Copy link

coveralls commented Sep 19, 2018

Pull Request Test Coverage Report for Build 1347

  • 47 of 52 (90.38%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 70.543%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/cluster/sort.go 47 52 90.38%
Files with Coverage Reduction New Missed Lines %
pkg/cluster/sort.go 1 85.9%
Totals Coverage Status
Change from base Build 1346: 0.06%
Covered Lines: 12580
Relevant Lines: 17833

💛 - Coveralls

Closes ksonnet#850

Signed-off-by: Oren Shomron <shomron@gmail.com>
@shomron shomron force-pushed the issue-850-sort-order branch from 2209bed to 8b703db Compare September 19, 2018 17:14

var kindOrderMap map[string]int

func init() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of having an init - could we use const + iota and just numeric sort?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How could I lookup the rank in O(1) using that approach?

@shomron shomron merged commit 81d758f into ksonnet:master Sep 20, 2018
@shomron shomron deleted the issue-850-sort-order branch September 20, 2018 14:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants