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

BlobDataProvider should return DataErrorKind::ExtraneousLocale for singleton structs #3505

Closed
robertbastian opened this issue Jun 7, 2023 · 4 comments · Fixed by #3562
Closed
Labels
C-data-infra Component: provider, datagen, fallback, adapters S-small Size: One afternoon (small bug fix or enhancement) T-bug Type: Bad behavior, security, privacy

Comments

@robertbastian
Copy link
Member

Currently it returns MissingLocale, which is not correct, as it will make fallback continue. For example requesting de-DE for a singleton with fallback will try de-DE, de, und and actually succeed, where it should be an error because trying de-DE for such a key is a bad request.

@robertbastian robertbastian added T-bug Type: Bad behavior, security, privacy S-small Size: One afternoon (small bug fix or enhancement) labels Jun 7, 2023
@robertbastian
Copy link
Member Author

Fixed in #3494 for databake.

@robertbastian
Copy link
Member Author

We might want to add the singleton-ness of a KeyedDataMarker to the key metadata.

@sffc
Copy link
Member

sffc commented Jun 7, 2023

We might want to add the singleton-ness of a KeyedDataMarker to the key metadata.

+1

@sffc sffc added the C-data-infra Component: provider, datagen, fallback, adapters label Jun 7, 2023
@sffc
Copy link
Member

sffc commented Jun 15, 2023

Discussion:

  • Good to add a singleton field to the DataKeyMetadata
  • Maybe add a load_singleton or load_und function to DataProvider (with a default implementation that calls load), but we're not convinced if it's actually useful
  • We could make the singleton part of the type system, but @sffc thinks that's too much machinery and it's fine as metadata

LGTM: @sffc @robertbastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-data-infra Component: provider, datagen, fallback, adapters S-small Size: One afternoon (small bug fix or enhancement) T-bug Type: Bad behavior, security, privacy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants