unkey icon indicating copy to clipboard operation
unkey copied to clipboard

[🕹️] API Name is cached after renaming

Open Flo4604 opened this issue 1 year ago • 20 comments

Preliminary Checks

  • [X] I have reviewed the documentation: https://unkey.com/docs

  • [X] I have searched for existing issues: https://github.com/unkeyed/unkey/issues

  • [X] This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.

Reproduction / Replay Link (Optional)

No response

Issue Summary

Sometimes when you rename your api the old name will stayed cached in the header

Steps to Reproduce

  1. Go into an api
  2. Rename it
  3. See if the name is correct, sometimes this only happens after a second rename ( See repro video on prod )

Expected behavior

That the name always changes once I press save

Other information

No response

Screenshots

https://github.com/user-attachments/assets/5321c0d8-e705-4b48-a628-a66626334f1e

Version info

-

Flo4604 avatar Oct 04 '24 22:10 Flo4604

When using unstable_cache in Breadcrum to cache API calls, changes to properties are not triggering cache revalidation. Specifically, updating a property does not invalidate the cached response, resulting in stale data being returned.

Not only in api renaming but also -

  • API renaming
  • Rate limiting namespace updates
  • Authorization role updates ( changing role names)
  • Authorization permission updates (changing permission names

To address this, we can revalidateTag to revalidate the cache when properties change.

one of solutions - https://github.com/user-attachments/assets/a5b08387-9628-44de-82b3-443588256f69

I have working solution but waiting for maintainers to add oss.gg label

AkshayBandi027 avatar Oct 05 '24 06:10 AkshayBandi027

Hey @AkshayBandi027 You should first assign yourself and then start working on it. But before that, pls wait for the maintainers to add oss.gg label and points

DeepaPrasanna avatar Oct 05 '24 06:10 DeepaPrasanna

@AkshayBandi027 Yes, I was about to suggest tags as well, can you do them all?

chronark avatar Oct 05 '24 11:10 chronark

/award 150 points

chronark avatar Oct 05 '24 11:10 chronark

Awarding Flo4604: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/Flo4604

oss-gg[bot] avatar Oct 05 '24 11:10 oss-gg[bot]

/assign

AkshayBandi027 avatar Oct 05 '24 11:10 AkshayBandi027

/assign

Harsh-Sanklecha avatar Oct 07 '24 12:10 Harsh-Sanklecha

Assigned to @Harsh-Sanklecha! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

oss-gg[bot] avatar Oct 07 '24 12:10 oss-gg[bot]

@Harsh-Sanklecha hold on please, there's already a PR for this I'm trying to understand why the bot allowed it

chronark avatar Oct 07 '24 12:10 chronark

@Harsh-Sanklecha, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.

oss-gg[bot] avatar Oct 09 '24 00:10 oss-gg[bot]

You are not allowed to award points! Please contact an admin.

oss-gg[bot] avatar Oct 10 '24 14:10 oss-gg[bot]

/assign

aryanbansal73 avatar Oct 10 '24 19:10 aryanbansal73

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 10 '24 19:10 oss-gg[bot]

/assign

xRiddin avatar Oct 11 '24 16:10 xRiddin

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 11 '24 16:10 oss-gg[bot]

/assign

bwithnomi avatar Oct 12 '24 09:10 bwithnomi

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 12 '24 09:10 oss-gg[bot]

/assign

Vardhaman619 avatar Oct 15 '24 15:10 Vardhaman619

This issue is already assigned to another person. Please find more issues here.

oss-gg[bot] avatar Oct 15 '24 15:10 oss-gg[bot]