Skip to content

Clarify error message about multiple datastores#4692

Open
europaul wants to merge 1 commit intolf-edge:masterfrom
europaul:improve-datastore-error-message
Open

Clarify error message about multiple datastores#4692
europaul wants to merge 1 commit intolf-edge:masterfrom
europaul:improve-datastore-error-message

Conversation

@europaul
Copy link
Copy Markdown
Contributor

EVE currently doens't support multiple datastores for OCI images. This commit adds a more descriptive error message to the error that is returned when multiple datastores are detected.

For reasons behind this limitation, see commit
34ae228

EVE currently doens't support multiple datastores for OCI images. This commit adds a more descriptive error message to the error that is returned when multiple datastores are detected. For reasons behind this limitation, see commit 34ae228 Signed-off-by: Paul Gaiduk <paulg@zededa.com>
Copy link
Copy Markdown
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

Re-reading the old commit you cited, I think it is overly conservative.
The logic in it assumes that if one datastore is an OCI registry then all of them should be, but it doesn't explicitly check for that but instead checks that there is only one.

I don't think it would be hard to fix that by checking that all or none are OCI. Can you look into this as an alternative approach?

@OhmSpectator OhmSpectator requested a review from Copilot April 7, 2025 12:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

if status.IsOCIRegistry {
if len(status.DatastoreIDList) > 1 {
err := fmt.Sprintf("doUpdateContentTree(%s) name %s: OCI registry along with the fallback datastores list is not supported",
err := fmt.Sprintf("doUpdateContentTree(%s) name %s: EVE doesn't support multiple datastores for OCI registry. Please use only one datastore",
Copy link

Copilot AI Apr 7, 2025

Choose a reason for hiding this comment

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

The error message now uses 'OCI registry', but the PR title and description reference OCI images; consider aligning the terminology for consistency.

Suggested change
err := fmt.Sprintf("doUpdateContentTree(%s) name %s: EVE doesn't support multiple datastores for OCI registry. Please use only one datastore",
err := fmt.Sprintf("doUpdateContentTree(%s) name %s: EVE doesn't support multiple datastores for OCI images. Please use only one datastore",
Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

@europaul what's the status of this PR?

@europaul
Copy link
Copy Markdown
Contributor Author

I'm going to do what @eriknordmark suggested, but I haven't started yet.

@OhmSpectator
Copy link
Copy Markdown
Member

I'm going to do what @eriknordmark suggested, but I haven't started yet.

Got it, thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants