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

[BUG] Protected/non-searchable metadata fields shouldn't be truncated #3331

Closed
frascuchon opened this issue Jul 4, 2023 · 0 comments · Fixed by #3342
Closed

[BUG] Protected/non-searchable metadata fields shouldn't be truncated #3331

frascuchon opened this issue Jul 4, 2023 · 0 comments · Fixed by #3342
Assignees
Labels
area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@frascuchon
Copy link
Member

Describe the bug
Still for protected/non-searchable fields the metadata value limit truncation is applied. This could be skipped for this kind of field, letting users store more general info there.

Stacktrace and Code to create the bug

record.metadata["_protected"] = ... # large value here
rg.log(record,dataset)
...
ds = rg.load(dataset)
for r in ds:
   r.metadata["_protected"] # The value will be truncated

Expected behavior
The protected metadata fields should be stored as is, without data truncation.

Environment:

  • Argilla Version [e.g. 1.0.0]: 1.10.0
  • ElasticSearch Version [e.g. 7.10.2]: 8.5.3
  • Docker Image (optional) [e.g. argilla:v1.0.0]:

Additional context
N/A

@frascuchon frascuchon added type: bug Indicates an unexpected problem or unintended behavior area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints labels Jul 4, 2023
@frascuchon frascuchon self-assigned this Jul 4, 2023
@frascuchon frascuchon changed the title [BUG] Protected/Non-searchable metadata fields shouldn't be truncated [BUG] Protected/non-searchable metadata fields shouldn't be truncated Jul 4, 2023
@frascuchon frascuchon added this to the v1.13 milestone Jul 4, 2023
frascuchon added a commit that referenced this issue Jul 6, 2023
<!-- Thanks for your contribution! As part of our Community Growers
initiative 🌱, we're donating Justdiggit bunds in your name to reforest
sub-Saharan Africa. To claim your Community Growers certificate, please
contact David Berenstein in our Slack community or fill in this form
https://tally.so/r/n9XrxK once your PR has been merged. -->

# Description

This PR reviews and improves the [protected metadata
field's](https://docs.argilla.io/en/latest/guides/log_load_and_prepare_data.html#protected-fields)
functionality:

- Values for protected fields won't be truncated
- Support for other than text content. Raw json dict are now supported.

Closes #3331 
Closes #3332  

**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [X] Bug fix (non-breaking change which fixes an issue)
- [X] Improvement (change adding some improvement to an existing
functionality)


**How Has This Been Tested**

(Please describe the tests that you ran to verify your changes. And
ideally, reference `tests`)

tested with a local instance 

**Checklist**

- [ ] I added relevant documentation
- [x] follows the style guidelines of this project
- [x] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK)
(see text above)
- [x] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: David Berenstein <david.m.berenstein@gmail.com>
Co-authored-by: Gabriel Martín Blázquez <gmartinbdev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant