Closed Bug 1242591 Opened 8 years ago Closed 5 years ago

Rename MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT

Categories

(Toolkit :: Telemetry, defect, P4)

defect
Points:
1

Tracking

()

RESOLVED WONTFIX
mozilla49
Tracking Status
firefox46 --- affected

People

(Reporter: Dexter, Assigned: claas, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [measurement:client])

Attachments

(1 file, 3 obsolete files)

Since bug 1234526 landed, there's no Health Report service anymore. The MOZ_SERVICES_HEALTHREPORT is still being used to enable/disable about:healthreport and SelfSupport.

We should rename MOZ_SERVICES_HEALTHREPORT to something more fitting - MOZ_ENABLE_HEALTHREPORT for example.
Blocks: 1201022
Whiteboard: [measurement:client]
Points: --- → 1
Priority: -- → P3
Lets try to do this soon - its not a lot of work and its confusingly named now
Priority: P3 → P2
Priority: P2 → P3
Priority: P3 → P4
Is there anything else to do here beyond renaming instances of MOZ_SERVICES_HEALTHREPORT in the source code to MOZ_ENABLE_HEALTHREPORT (which would be consistent with other MOZ_ENABLE_* constants)?
Flags: needinfo?(gfritzsche)
Maybe I can answer the question myself: As MOZ_SERVICES_HEALTHREPORT=0 is possibly already used, it could either be kept as an alias (e.g. by adding an #elif branch at 0 and similar locations) or a warning could be emitted when configured. Can you affirm?

0: https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/AppConstants.jsm#64
Sorry for the long response time.

I think we can just replace all the occurences we see in our code, that is fine.
However, we do need an alias to support historic values in existing mozconfig files that don't live in our tree (e.g. for Linux distributions).
For that we'd need to define MOZ_ENABLE_HEALTHREPORT in the configure script when either of MOZ_ENABLE_HEALTHREPORT and MOZ_SERVICES_HEALTHREPORT are set:
https://dxr.mozilla.org/mozilla-central/search?q=path%3Aold-configure.in+MOZ_SERVICES_HEALTHREPORT&redirect=false&case=true
Flags: needinfo?(gfritzsche)
Margaret, just checking to be sure:
Given that the FHR code was removed on Android too, are we fine with renaming MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT on mobile too?

https://dxr.mozilla.org/mozilla-central/search?q=MOZ_SERVICES_HEALTHREPORT+path%3Amobile&redirect=false&case=true
Flags: needinfo?(margaret.leibovic)
(In reply to Georg Fritzsche [:gfritzsche] from comment #5)
> Margaret, just checking to be sure:
> Given that the FHR code was removed on Android too, are we fine with
> renaming MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT on mobile too?
> 
> https://dxr.mozilla.org/mozilla-central/
> search?q=MOZ_SERVICES_HEALTHREPORT+path%3Amobile&redirect=false&case=true

This sounds fine to me, but let's double check with Mike.
Flags: needinfo?(margaret.leibovic) → needinfo?(michael.l.comella)
We use an #ifdef in AppConstants to set this value. Provided we update the usages in mobile/android/ [1] too, I'm sure it'll be fine.

[1]: https://mxr.mozilla.org/mozilla-central/search?string=MOZ_SERVICES_HEALTHREPORT&find=mobile%2Fandroid&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
Flags: needinfo?(michael.l.comella)
Ok, thanks.

Claas, would you be interested in taking this bug?
Flags: needinfo?(mozilla)
Thanks for the feedback, Georg, I'm happily taking this bug.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(mozilla)
Target Milestone: --- → mozilla49
Attachment #8756974 - Flags: review?(gfritzsche)
Comment on attachment 8756974 [details] [diff] [review]
Rename MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT

Sorry, i'm out sick. Alessio, can you take look?
Attachment #8756974 - Flags: review?(gfritzsche) → feedback?(alessio.placitelli)
Comment on attachment 8756974 [details] [diff] [review]
Rename MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT

Review of attachment 8756974 [details] [diff] [review]:
-----------------------------------------------------------------

The changes look good to me.

IMHO, most of the changes in old-cofnigure.in can be dropped due to bug 1257326.

[2] - https://dxr.mozilla.org/mozilla-central/rev/4d63dde701b47b8661ab7990f197b6b60e543839/build/moz.configure/init.configure#715

::: browser/moz.configure
@@ +4,5 @@
>  # License, v. 2.0. If a copy of the MPL was not distributed with this
>  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
>  
>  imply_option('MOZ_PLACES', True)
> +imply_option('MOZ_ENABLE_HEALTHREPORT', True)

I think that, due to bug 1257326 [1] and this change, we can drop the additions in old-configure.in, as MOZ_ENABLE_HEALTHREPORT is automatically implied here.

[1] - https://hg.mozilla.org/mozilla-central/rev/5b74c0699042

::: old-configure.in
@@ +6760,5 @@
>        AC_DEFINE(MOZ_TELEMETRY_ON_BY_DEFAULT)
>      fi
>  fi
>  
> +dnl Support historic FHR switch.

I think we can drop this part up to line 6768, see the comment from moz.configure.
Attachment #8756974 - Flags: feedback?(alessio.placitelli)
Thanks for the review, Alessio.

The attached patch contains all changes from the previous patch except for the additions in |old-configure.in| (I kept the replacement for the sake of consistency).
Attachment #8756974 - Attachment is obsolete: true
Attachment #8762569 - Flags: review?(alessio.placitelli)
Hi Claas. Due to the London workweek, we'll be slow to respond until next week.
Comment on attachment 8762569 [details] [diff] [review]
Rename MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT.

Review of attachment 8762569 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good to me.

Georg has to review this though :-)
Attachment #8762569 - Flags: review?(gfritzsche)
Attachment #8762569 - Flags: review?(alessio.placitelli)
Attachment #8762569 - Flags: feedback+
Comment on attachment 8762569 [details] [diff] [review]
Rename MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT.

Review of attachment 8762569 [details] [diff] [review]:
-----------------------------------------------------------------

Mike, can you give feedback on this from the build perspective?

We don't have a FHR services anymore, but we still have user-facing "FHR"-branded features.
So we are trying to rename the, now confusing, "MOZ_SERVICES_HEALTHREPORT" to "MOZ_ENABLE_HEALTHREPORT".
What i'm concerned about is users or distributions having "MOZ_SERVICES_HEALTHREPORT" in their mozconfigs.

I think we need to treat "MOZ_SERVICES_HEALTHREPORT" as an alias for "MOZ_ENABLE_HEALTHREPORT".
Is defining the latter in old-configure.in when the first is present in the mozconfig the right approach for that?
I also see this with |imply_option()| in |browser/moz.configure| - can we still set it to a "false" equivalent? How?

::: old-configure.in
@@ +6738,5 @@
>  
>  dnl If we have any service that uploads data (and requires data submission
>  dnl policy alert), set MOZ_DATA_REPORTING.
>  dnl We need SUBST for build system and DEFINE for xul preprocessor.
> +if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_ENABLE_HEALTHREPORT" || test -n "$MOZ_CRASHREPORTER"; then

Do we need to support "MOZ_SERVICES_HEALTHREPORT" here as an alias here?

::: toolkit/moz.configure
@@ +407,1 @@
>               help='Build Firefox Health Reporter Service',

help='Enable Firefox Health Report features'
Attachment #8762569 - Flags: feedback?(mh+mozilla)
Review ping.
Flags: needinfo?(mh+mozilla)
(In reply to Georg Fritzsche [:gfritzsche] [away Jun 24 - Jul 3] from comment #16)
> Comment on attachment 8762569 [details] [diff] [review]
> Rename MOZ_SERVICES_HEALTHREPORT to MOZ_ENABLE_HEALTHREPORT.
> 
> Review of attachment 8762569 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Mike, can you give feedback on this from the build perspective?
> 
> We don't have a FHR services anymore, but we still have user-facing
> "FHR"-branded features.
> So we are trying to rename the, now confusing, "MOZ_SERVICES_HEALTHREPORT"
> to "MOZ_ENABLE_HEALTHREPORT".
> What i'm concerned about is users or distributions having
> "MOZ_SERVICES_HEALTHREPORT" in their mozconfigs.
> 
> I think we need to treat "MOZ_SERVICES_HEALTHREPORT" as an alias for
> "MOZ_ENABLE_HEALTHREPORT".

If MOZ_SERVICES_HEALTHREPORT is kept for that reason, then why rename at all? Plus, MOZ_ENABLE_* variables are not very appealing either. The ENABLE is kind of redundant with the value of the variable. Yes, we have some, but they are a minority.
Flags: needinfo?(mh+mozilla)
Attachment #8762569 - Flags: feedback?(mh+mozilla)
(In reply to Mike Hommey [:glandium] from comment #18)
> > I think we need to treat "MOZ_SERVICES_HEALTHREPORT" as an alias for
> > "MOZ_ENABLE_HEALTHREPORT".
> 
> If MOZ_SERVICES_HEALTHREPORT is kept for that reason, then why rename at
> all? Plus, MOZ_ENABLE_* variables are not very appealing either. The ENABLE
> is kind of redundant with the value of the variable. Yes, we have some, but
> they are a minority.

MOZ_SERVICES_HEALTHREPORT is confusing - there is no healthreport service anymore.
This now just controls some front-end features.

Can you maybe suggest a better naming? Just MOZ_HEALTHREPORT?
Flags: needinfo?(mh+mozilla)
> Just MOZ_HEALTHREPORT?

why not?
Flags: needinfo?(mh+mozilla)
Mentor: gfritzsche
Attachment #8777933 - Flags: review?(gfritzsche)
Attachment #8762569 - Attachment is obsolete: true
Attachment #8762569 - Flags: review?(gfritzsche)
Comment on attachment 8777933 [details] [diff] [review]
Rename MOZ_SERVICES_HEALTHREPORT to MOZ_HEALTHREPORT

Review cancelled due to merge conflicts.
Attachment #8777933 - Flags: review?(gfritzsche)
Attachment #8777933 - Attachment is obsolete: true
Comment on attachment 8818390 [details] [diff] [review]
Rename MOZ_SERVICES_HEALTHREPORT to MOZ_HEALTHREPORT

I have updated my patch to replace all current occurrences of MOZ_SERVICES_HEALTHREPORT by MOZ_HEALTHREPORT, correcting the merge conflicts.

Regarding MOZ_SERVICES_HEALTHREPORT: As it used to default to True (in moz.configure), it only allowed disabling FHR by setting it to "" (empty), which would now become its new default (if omitted in moz.configure). That said, the only way to maintain it as an alias would be to have MOZ_SERVICES_HEALTHREPORT and MOZ_HEALTHREPORT both default to True (in moz.configure), but to set MOZ_HEALTHREPORT to "" (empty) if MOZ_SERVICES_HEALTHREPORT is "" (empty) (in old-configure.in). So I wonder: Is it worth it? Do we have build telemetry data to support that MOZ_SERVICES_HEALTHREPORT is actually used in any mozconfig?

PS: I noticed that the crash reporter can be disabled with |ac_add_options --disable-crashreporter|, so I was wondering whether |ac_add_options --disable-healthreport| wouldn't be a cleaner way to disable healthreport?!
Attachment #8818390 - Flags: review?(gfritzsche)

Closing this as WONTFIX, since this is a bit of a risky change to do right now. Moreover, we might have a different data collection mechanism in the future that save us the trouble of doing this now.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Attachment #8818390 - Flags: review?(gfritzsche)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: