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

feat: restrict versioning by days #4547

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

kyle-ssg
Copy link
Member

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

Adjusts limiting of version history to date rather than number of versions

How did you test this code?

Manually set limitation in code against https://pr-4433-deployment-54847-flagsmith.app.uffizzi.com/

Disabled links in audit log

image

Disabled versions in history

image

@kyle-ssg kyle-ssg requested a review from a team as a code owner August 28, 2024 11:49
@kyle-ssg kyle-ssg requested review from novakzaballa and removed request for a team August 28, 2024 11:49
Copy link

vercel bot commented Aug 28, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 1:55pm
flagsmith-frontend-preview 🛑 Canceled (Inspect) Oct 8, 2024 1:55pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 1:55pm

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard feature New feature or request labels Aug 28, 2024
Copy link
Contributor

github-actions bot commented Aug 28, 2024

Docker builds report

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

Copy link
Contributor

github-actions bot commented Aug 28, 2024

Uffizzi Ephemeral Environment deployment-56361

☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/4547

📄 View Application Logs etc.

What is Uffizzi? Learn more!

Copy link
Contributor

@novakzaballa novakzaballa left a comment

Choose a reason for hiding this comment

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

LGTM from a code perspective

@matthewelwell
Copy link
Contributor

I guess it's good to have the code there, but in theory we should never need the logic to blank out the link from the audit log, because the audit log visibility is also restricted for non-enterprise plans.

@matthewelwell
Copy link
Contributor

Some issues I've found in testing:

  1. Since I'm running this self hosted, I would have expected the plan next to 'Version History' to say 'Enterprise' here, like it does for Audit Logs.
image image
  1. The only time that the API will return versions older than the limit is when the current live version is older than the limit. We shouldn't really blur this out.
image

If we want to blur things out, I could perhaps return a field that states that there are older versions, but I don't think this is necessary. I think we should just let the API handle the restrictions here.

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

See feedback in comment above.

@kyle-ssg
Copy link
Member Author

@matthewelwell this has been resolved

# Conflicts:
#	frontend/common/services/useFeatureVersion.ts
#	frontend/web/components/FeatureHistory.tsx
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Sep 10, 2024
@kyle-ssg
Copy link
Member Author

Note: due to recent PR merge this can now be found within the feature modal
image

Copy link
Member

@rolodato rolodato left a comment

Choose a reason for hiding this comment

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

I briefly played around with this but wasn't able to set up a fully representative local environment to test looking at older audit log entries or version history - is there a quick way I could do that?

frontend/web/components/AuditLog.tsx Show resolved Hide resolved
frontend/web/components/AuditLog.tsx Show resolved Hide resolved
@kyle-ssg
Copy link
Member Author

I briefly played around with this but wasn't able to set up a fully representative local environment to test looking at older audit log entries or version history - is there a quick way I could do that?

q for @matthewelwell

@kyle-ssg
Copy link
Member Author

@rolodato resolved button colour in dark mode. I think we're good to go on this ?

@kyle-ssg kyle-ssg requested review from rolodato and novakzaballa and removed request for novakzaballa October 1, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants