Skip to content
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

DB: Remove ErrAlreadyDefined sentinel error. #13252

Merged
merged 7 commits into from
Apr 3, 2024

Conversation

markylaing
Copy link
Contributor

@markylaing markylaing commented Apr 3, 2024

This error is imported by the lxd/request package so that it canconvert it to an http.StatusConflict on a call to response.SmartError. Other applications are using the lxd/request package. Removing this error prevents the import of lxd/db into lxd/request and therefore prevents the import of lxd/db into downstream repositories.

Unblocks canonical/microcluster#97

This error is imported by the `lxd/request` package so that it can
convert it to an `http.StatusConflict` on a call to
`response.SmartError`. Other applications are using the `lxd/request`
package. Removing this error prevents the import of `lxd/db` into
`lxd/request` and therefore prevents the import of `lxd/db` into
downstream repositories.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
This will be caught by `response.SmartError` equivalently to return a
409 to the caller. Additionally, error messages are updated to be more
descriptive.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
@markylaing markylaing self-assigned this Apr 3, 2024
lxd/backup.go Outdated Show resolved Hide resolved
lxd/backup.go Outdated Show resolved Hide resolved
lxd/backup.go Outdated Show resolved Hide resolved
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
@markylaing
Copy link
Contributor Author

Now failing unit tests. Missed some references.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
@tomponline tomponline merged commit c6ec68b into canonical:main Apr 3, 2024
29 checks passed
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.

2 participants