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: add support for Daily Active User feature #2649

Merged
merged 7 commits into from
Aug 16, 2024
Merged

Conversation

mcollovati
Copy link
Contributor

Adds support for Daily Active User feature for DAU enabled production build artifacts.

@mcollovati
Copy link
Contributor Author

This is a draft PR, just to share a potential solution for DAU integration in Hilla and start a discussion.
Currently, it won't compile because it requires vaadin/flow#19771

if (service != null) {
DAUUtils.TrackableOperation.INSTANCE.execute(() -> {
service.requestStart(vaadinRequest, vaadinResponse);
DAUUtils.applyEnforcement(vaadinRequest, unused -> true);
Copy link
Contributor Author

@mcollovati mcollovati Aug 9, 2024

Choose a reason for hiding this comment

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

Once the Flow PR will be merged, this should be changed int this way

    if (DAUUtils.isDauEnabled(service)) {
        FlowDauIntegration.applyEnforcement(vaadinRequest, unused -> true)
    }

Copy link
Contributor

Choose a reason for hiding this comment

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

Done.

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.17%. Comparing base (0ebdc3e) to head (e0c258c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2649   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files          78       78           
  Lines        2454     2454           
  Branches      634      634           
=======================================
  Hits         2262     2262           
  Misses        145      145           
  Partials       47       47           
Flag Coverage Δ
unittests 92.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

License checker was change to provided scope in flow-server which broke some tests. Added dependency back in test scope only.
Added new serveEndpoint with a response and kept old for backwards compatibility.
DAUUtils.trackDAU(VaadinService, HttpServletRequest, HttpServletResponse) is helper that does same things as EndpointController before, but code is moved to flow codebase.
@tltv
Copy link
Member

tltv commented Aug 13, 2024

Requires now also vaadin/flow#19782.

Copy link

sonarcloud bot commented Aug 15, 2024

@tltv tltv marked this pull request as ready for review August 15, 2024 07:08
@platosha platosha dismissed mshabarov’s stale review August 16, 2024 11:16

addressed in the comments

@platosha platosha merged commit 60cdc46 into main Aug 16, 2024
15 checks passed
@platosha platosha deleted the feat/dau-support branch August 16, 2024 11:16
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Hilla 24.5.0.alpha9 and is also targeting the upcoming stable 24.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants