Skip to content

Remove failed attribute #9032

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

Merged
merged 4 commits into from
Nov 28, 2024
Merged

Remove failed attribute #9032

merged 4 commits into from
Nov 28, 2024

Conversation

fogelito
Copy link
Contributor

@fogelito fogelito commented Nov 27, 2024

To delete failed attributes in _metadata and the adapter.

What does this PR do?

(Provide a description of what this PR does and why it's needed.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

Copy link

github-actions bot commented Nov 27, 2024

Security Scan Results for PR

Docker Image Scan Results

🎉 No vulnerabilities found!

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link

github-actions bot commented Nov 27, 2024

✨ Benchmark results

  • Requests per second: 1,137
  • Requests with 200 status code: 204,698
  • P99 latency: 0.185414453

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,137 2,065
200 204,698 371,794
P99 0.185414453 0.077499598

switch ($attribute->getAttribute('format')) {
case APP_DATABASE_ATTRIBUTE_INT_RANGE:
case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE:
if ($min === $formatOptions['min'] && $max === $formatOptions['max']) {
Copy link
Contributor Author

@fogelito fogelito Nov 27, 2024

Choose a reason for hiding this comment

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

  • I removed this for 2 reasons.
  1. $options is never null , so will always update in the adapter updateAttribute method
  2. In case of no values changes in $min $max , it will fix the value in _metadata, which currently is overwritten to empty array; having inconsistency between metadata and Appwrite;

@abnegate abnegate merged commit 3d44757 into 1.6.x Nov 28, 2024
63 checks passed
@abnegate abnegate deleted the 1.6.x-fix-delete-attribute branch November 28, 2024 03:32
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