-
Notifications
You must be signed in to change notification settings - Fork 464
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
Fixup UUID generation. #627
Fixup UUID generation. #627
Conversation
5b0ba90
to
ea7ca0d
Compare
Adding support for generating UUIDs for multiple projects at once is a nice improvement, worth a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog entry
UUIDGenerator.new([self]).generate! | ||
end | ||
|
||
def self.predictabilize_uuids(projects) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs
new_objects_by_project = Hash[@projects.map do |project| | ||
[project, switch_uuids(project)] | ||
end] | ||
all_new_objects_by_project = new_objects_by_project.values.map(&:values).flatten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flat_map(&:values)
end] | ||
all_new_objects_by_project = new_objects_by_project.values.map(&:values).flatten | ||
all_objects_by_uuid = @projects.map(&:objects_by_uuid).inject(:merge) | ||
all_objects = @projects.map(&:objects).flatten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flat_map
118ecdc
to
b206b2b
Compare
Support the ability to pass in a list of projects that can be used to generate deterministic UUIDs, and also initially pass into UUID generation the project basename such that we have unique UUIDs across all projects.
b206b2b
to
9d46a32
Compare
Support the ability to pass in a list of projects that can be used to generate deterministic UUIDs, and also initially pass into UUID generation the project basename such that we have unique UUIDs across all projects.