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

Add flagd UI #1725

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Conversation

maindotmarcell
Copy link
Contributor

@maindotmarcell maindotmarcell commented Sep 23, 2024

Changes

We're adding a user interface to the demo, through which users of the demo can update the Flagd feature flag configuration file in a more user friendly way.

Finished changes

  • Created the flagd-ui directory
    • Initialized a Next.js application
    • Created a basic view in which users can set flags in a user friendly way
    • Created an advanced view in which users can interact with the json directly from the app (includes json schema checking to ensure that the file stays valid)
    • Created a navigation bar to be able to navigate easily between the views
    • Instrumented with OpenTelemetry automatic instrumentation
    • Added Dockerfile
  • Made necessary changes to docker-compose.yaml (config file is mounted as a volume)
  • Made changes to the frontend-proxy configuration so this UI is accessible at :8080/feature

Suggested roadmap for future contributions

  • Support for fractional targeting
  • Solution for compatibility with flagd sidecar containers for general usage (outside of the demo)

Merge Requirements

For new features contributions, please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs
  • Appropriate Helm chart updates in the helm-charts

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

Copy link

linux-foundation-easycla bot commented Sep 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: maindotmarcell / name: Marcell Münnich (d6f2639)
  • ✅ login: bornav (5e5ea33)

@github-actions github-actions bot added the helm-update-required Requires an update to the Helm chart when released label Sep 23, 2024
@beeme1mr
Copy link
Contributor

Hey @maindotmarcell, I'm Mike from the OpenFeature team. Thanks for getting this started! Please let me know if you need our support.

By the way, I've been experimenting with a flagd compatible rule builder React component. Perhaps I could contribute to that once the initial version is live.

@maindotmarcell
Copy link
Contributor Author

Hi @beeme1mr, sounds awesome! Thanks for letting me know, we could definitely add something like a rule builder to this eventually :)

@maindotmarcell maindotmarcell force-pushed the add-flagd-ui branch 2 times, most recently from 7fb7834 to e33d518 Compare September 25, 2024 08:05
@maindotmarcell maindotmarcell marked this pull request as ready for review September 25, 2024 08:09
@maindotmarcell maindotmarcell requested a review from a team as a code owner September 25, 2024 08:09
@mviitane
Copy link
Member

Hi @maindotmarcell, there are some failing checks related to markdown-lint, sanity, and license. Could you fix those so we can proceed with the PR?

@maindotmarcell maindotmarcell force-pushed the add-flagd-ui branch 6 times, most recently from 299a480 to b38638e Compare October 1, 2024 12:24
@klucsik
Copy link
Contributor

klucsik commented Oct 1, 2024

With 1.11.1 images, and built-from-source frontend-proxy and flagd-ui images it works fine at my side. I checked the flags from frontend: As soon as I saved in the Ui, a new EvenStream request ran, fetching the fresh flag values.

Basic view:
image
Advanced view:
image

Copy link
Contributor

@rogercoll rogercoll left a comment

Choose a reason for hiding this comment

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

Thanks for adding this, that's such a nice new feature!

I cannot provide my review from the code perspective (nextjs), but from the microservice project structure it looks good overall.

Could you add the microservice in the .github/workflow files too? This is needed for the image generation. You can find some examples in https://github.com/open-telemetry/opentelemetry-demo/blob/main/.github/workflows/component-build-images.yml#L38

Feel free to ping me on CNCF's Slack if you need any help/guidance with the CI part

@maindotmarcell
Copy link
Contributor Author

@rogercoll Thank you for the feedback! Good point, I'll add the service in the workflows :)

@maindotmarcell
Copy link
Contributor Author

@rogercoll I added the changes to the workflow, could you please check if this is correct please? 🙏

Copy link
Contributor

@rogercoll rogercoll left a comment

Choose a reason for hiding this comment

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

Code structure lgtm, please @open-telemetry/demo-approvers could you help to review the Typescript part?

Thanks!

Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

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

Hello @maindotmarcell 👋🏽
Thank you for this PR, the /feature is something a lot of users wanted back.

I've left a couple of comments in your PR, mainly asking you to keep the changes to the flagd-ui service only, this makes easier to review further and keep track of what you are actually adding.

One main thing that I've noticed is that you are only using the @vercel/otel instrumentation, so I've left a suggestion to get rid of all other OTel dependencies.

And last but not least, if you could change the exporter http to grpc that would make the .env file nicer.

Ah, one last thing, remember to update the package-lock.json file whenever updating the deps. Saying because I've already missed that some time ago 😊

CHANGELOG.md Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
src/flagd-ui/README.md Outdated Show resolved Hide resolved
src/flagd-ui/package.json Outdated Show resolved Hide resolved
src/flagd-ui/package.json Outdated Show resolved Hide resolved
src/flagd-ui/package.json Outdated Show resolved Hide resolved
src/flagd-ui/package.json Outdated Show resolved Hide resolved
@maindotmarcell
Copy link
Contributor Author

@julianocosta89 I've addressed all the changes you requested. Applied everything with the exception of changing otel exporter from http to grpc as for now I could only get it working with http. Let me know if you have any additional remarks :)

Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

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

Hey @maindotmarcell thanks for taking care of the comments.

I've added a couple of minor ones.
Also are you able to merge main into your PR and take a look at the merge conflicts?

I saw that in the docker-compose.yml file you have some changes that are not from your PR, I believe merging main here will solve that.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/flagd-ui/README.md Outdated Show resolved Hide resolved
src/flagd-ui/README.md Outdated Show resolved Hide resolved
src/flagd-ui/README.md Show resolved Hide resolved
Copy link
Member

@julianocosta89 julianocosta89 left a comment

Choose a reason for hiding this comment

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

Great work @maindotmarcell!
Thanks for your patience while addressing all comments.

@julianocosta89
Copy link
Member

@maindotmarcell would you be able to resolve the changelog conflict?
I'll merge the PR after that.

@maindotmarcell
Copy link
Contributor Author

@julianocosta89 Awesome! just did it :)

@maindotmarcell maindotmarcell force-pushed the add-flagd-ui branch 3 times, most recently from cd6e901 to 93b7c78 Compare October 15, 2024 09:18
@julianocosta89 julianocosta89 merged commit d953c81 into open-telemetry:main Oct 15, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
helm-update-required Requires an update to the Helm chart when released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants