Skip to content

Conversation

@jhuang38
Copy link
Contributor

Description

Give new UUID to instance config if UUID already exists. In dashboard, duplicate names will show up:
image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Note: make sure your files are formatted with rust-analyzer

@jhuang38 jhuang38 requested a review from CheatCod August 27, 2023 19:13
@netlify
Copy link

netlify bot commented Aug 27, 2023

Deploy Preview for lodestone-dashboard canceled.

Name Link
🔨 Latest commit b969441
🔍 Latest deploy log https://app.netlify.com/sites/lodestone-dashboard/deploys/64eee60c36437d0008faef21

@netlify
Copy link

netlify bot commented Aug 27, 2023

Deploy Preview for lodestone-storybook canceled.

Name Link
🔨 Latest commit b969441
🔍 Latest deploy log https://app.netlify.com/sites/lodestone-storybook/deploys/64eee60cfd33f1000732dfe6

core/src/lib.rs Outdated
info!("Instance with duplicate UUID {} updated to new UUID {}", uuid_string, dot_lodestone_config.uuid().to_string());
},
Err(e) => {
info!("Error with regenerating duplicate UUID {}, {}", uuid_string, e);
Copy link
Member

Choose a reason for hiding this comment

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

these logs should be warn and error

core/src/lib.rs Outdated
debug!("restoring instance: {}", path.display());

// regenerate duplicate UUID
let uuid = dot_lodestone_config.uuid().to_owned();
Copy link
Member

Choose a reason for hiding this comment

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

is this to_owned() call neccessary?

@jhuang38 jhuang38 requested a review from CheatCod August 30, 2023 06:47
@jhuang38 jhuang38 self-assigned this Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants