Relax field-level meta validation constraints#20578
Relax field-level meta validation constraints#20578urmichm wants to merge 1 commit intoopensearch-project:mainfrom
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThese changes relax validation constraints for field-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
|
❗ AI-powered Code-Diff-Analyzer found issues on commit 5f656fd.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
❌ Gradle check result for 5f656fd: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 5f656fd: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for e2080f7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❗ AI-powered Code-Diff-Analyzer found issues on commit 6ee1908.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit 71347c6 |
|
Hello @ShawnQiang1 |
|
❌ Gradle check result for 71347c6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
[Search Triage] @msfroh Can you help with the review here when you get the chance. |
|
Failed to generate code suggestions for PR |
|
❌ Gradle check result for d66e0c4: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
There was a problem hiding this comment.
@urmichm -- I've checked the commit message that added these restrictions, and I'm inclined to agree with removing them or at least relaxing them. As @epugh called out, adding more verbose values would be really helpful for agents to understand and interpret the schema of an index.
Instead of wholesale removing the restrictions, may I suggest that we relax them? Going fully unbounded still opens the opportunity for users to shoot themselves in the foot. I would still prefer that a field not have (say) 1MB of metadata.
Maybe we could relax to the following:
- Max number of keys raised to 100 (from 5).
- Increase the max key length to 255 (from 20).
- Increase the max length of any string value to 10000 (from 50).
I would also potentially be open to allowing nested objects, arrays, and numeric fields in field metadata, but I think that's a more complicated change.
What do you think?
Edit: Incidentally, it looks like you also need to fix some Spotless errors with ./gradlew spotlessApply.
|
@msfroh thank you for your feedback Naïve approach would be to convert the values into the string and check it's length. However, this approach has lots of limitations. I can update the current restrictions to the suggested values and open a new issue to allow non-string types with proper validation |
|
Given that the Alternatively we can restrict the total size of meta, rather then number of keys.
Examples:
We can split numbers into cc: @msfroh |
|
Failed to generate code suggestions for PR |
|
❌ Gradle check result for e06acde: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Failed to generate code suggestions for PR |
|
Failed to generate code suggestions for PR |
|
❌ Gradle check result for 8a74070: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Failed to generate code suggestions for PR |
|
Failed to generate code suggestions for PR |
|
❌ Gradle check result for 3ae0718: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Mikhail Urmich <urmich.m@gmail.com>
|
Failed to generate code suggestions for PR |
|
❌ Gradle check result for 42a4950: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
Restrictions on the field-level
metahave been relaxed:meta's values must be Strings of any lengthmeta's values can not be nullsmeta's keys must be Strings of any lengthRelated Issues
Resolves #19884
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.