Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
config/externalname.go
is one of the largest and most important hand-written files in this repository. Resources have been added (kind of) wherever in the file. Currently, when looking for a resource, or for several related resources, it is difficult to navigate or know when I've found all of them, and it looks very messy.Additionally, if I'm adding a new resource, and put it at the bottom, this can create git conflicts with someone else adding an unrelated resource in the same place.
I'd love to have a linter that automates this, but I couldn't find one that could handle the way we group resources by their go sdk package name, and that keeps the resources together with their explanatory comments. So I just did it manually.
It is my hope that now that the file is alphabetized, we can enforce that users keep it alphabetized in code review.
In order to prevent clobbering the git history, I introduced a
.git-blame-ignore-revs
file with the SHA of my rename commit. Once approved, I will merge this with a merge commit to ensure that the sha doesn't change.I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
I programmatically compared the new and old versions of externalname.go and they only differ in comments, ordering of map keys, and whitespace.
There are new entries in
externalnamenottested.go
because I migrated a few resources that had been commented out inexternalname.go
to uncommented inexternalnamenottested.go
. But we don't currently use that list for anything.Zero diff to the generated code confirms that this is a pure refactor with no meaningful changes.