Skip to content

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Apr 22, 2025

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Metadata fields inputs could stay stuck on non up to date values

  • Added envData dependency in AddMetadataToEntity useEffect
  • Removed useState management of metadata value (that was only triggered on first rendering)

How did you test this code?

  • Manually
  1. Create an environment (or feature) metadata field
  2. Set it
  3. Switch between environments

https://www.loom.com/share/f980f034f6144c548a2f30efd809f828

@Zaimwa9 Zaimwa9 requested review from a team as code owners April 22, 2025 13:54
@Zaimwa9 Zaimwa9 requested review from khvn26 and kyle-ssg and removed request for a team April 22, 2025 13:54
@vercel
Copy link

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2025 10:00am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2025 10:00am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 14, 2025 10:00am

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API fix labels Apr 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-5372 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-5372 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api-test:pr-5372 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith:pr-5372 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5372 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-5372 Finished ✅ Results

@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2025

Uffizzi Preview deployment-63018 was deleted.

@github-actions github-actions bot added fix and removed fix labels Apr 22, 2025
@Zaimwa9 Zaimwa9 changed the base branch from main to fix/update-metadata-value-from-entity April 22, 2025 14:05
Co-authored-by: Tiago Paiva <tiago@tiagopaiva.me>
environment = super().update(instance, validated_data) # type: ignore[no-untyped-call]
self.update_metadata(environment, metadata_items)
environment.refresh_from_db()
assert isinstance(environment, Environment)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? Not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed per say but mypy is a tough opponent and it would require unrelated typing that I think is overkill in the context of a bug fix

Copy link
Contributor

Choose a reason for hiding this comment

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

Fairy nuff. Let me know if you need help swinging a few punches.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW, the issue is tracked Flagsmith/flagsmith-common#71.

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.63%. Comparing base (188103e) to head (9d6c353).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5372      +/-   ##
==========================================
+ Coverage   97.62%   97.63%   +0.01%     
==========================================
  Files        1238     1239       +1     
  Lines       43000    43097      +97     
==========================================
+ Hits        41977    42078     +101     
+ Misses       1023     1019       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

environment = super().update(instance, validated_data) # type: ignore[no-untyped-call]
self.update_metadata(environment, metadata_items)
environment.refresh_from_db()
assert isinstance(environment, Environment)
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, the issue is tracked Flagsmith/flagsmith-common#71.

@github-actions github-actions bot added fix and removed fix labels May 14, 2025
@Zaimwa9 Zaimwa9 merged commit f39d530 into main May 14, 2025
28 checks passed
@Zaimwa9 Zaimwa9 deleted the fix/metadata-inputs-not-updating-value branch May 14, 2025 10:21
@Zaimwa9 Zaimwa9 changed the title fix: metadata inputs not updating values 🔴 waiting for #5362 fix: metadata inputs not updating values May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants