Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions experimenter/experimenter/jetstream/results_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ def append_kpi_metric_fields(
kpi["slug"], kpi["group"], analysis_basis, segment, reference_branch
)

if kpi["slug"] == NimbusConstants.RETENTION_3_DAYS:
kpi["displayed_window"] = "Day 4"
if kpi["slug"] == NimbusConstants.RETENTION:
kpi["displayed_window"] = "Week 2"
Comment on lines +390 to +393
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are these always accurate based on the data available? Like what happens on Day 3? Do we show "Day 4" for RETENTION_3_DAYS, or do we just show nothing? And I'm fairly sure Week 2 for Retention could be wrong in some cases because we haven't done #12647 yet, so it could be Week 1 (the old Results page always said Week 2 Retention so maybe we don't need to block on this).

I just want to make sure we aren't going to be potentially showing the wrong thing for early or wonky (missing days/weeks) results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fair points. the changes im making in #15050 will make it so 3day retention will remain unavailable until day 4 data is available so it will show nothing on Day <4 or if the metric has no data (this goes for all metrics). in that case i think the most logical thing to do would be to complete #15050 and #12647 before this


def get_remaining_metrics_metadata(
self, exclude_slugs=None, analysis_basis=None, segment=None, reference_branch=None
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ <h4 class="mb-0">{{ area }}</h4>
{% if not metric.has_data %}cursor: default;{% endif %}">
{% if metric.has_data %}
<i class="fa-solid fa-arrow-up-right-from-square text-secondary fa-sm position-absolute top-0 end-0 p-3 px-2"></i>
<small class="position-absolute bottom-0 end-0 p-2 fw-medium">
{% if metric.displayed_window %}
{{ metric.displayed_window|upper }}
{% else %}
{{ displayed_window|upper }}
{% endif %}
</small>
{% endif %}
<p class=" metric-text mb-0">{{ metric.friendly_name }}</p>
</button>
Expand Down
Loading