Skip to content

Commit 99e3aca

Browse files
committed
Merge pull request #287 from alisw/next
Release of aliBuild 1.3.0
2 parents 785f88a + 60502b5 commit 99e3aca

File tree

10 files changed

+586
-196
lines changed

10 files changed

+586
-196
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ before_install: |
1111
git clone -b IB/v5-06/next https://github.com/alisw/alidist
1212
script: |
1313
set -e
14+
alibuild/aliBuild analytics off
15+
test -e ~/.config/alibuild/disable-analytics
16+
test ! -e ~/.config/alibuild/analytics-uuid
17+
alibuild/aliBuild analytics on
18+
test ! -e ~/.config/alibuild/disable-analytics
19+
test -e ~/.config/alibuild/analytics-uuid
20+
alibuild/aliBuild analytics off
21+
test -e ~/.config/alibuild/disable-analytics
22+
test -e ~/.config/alibuild/analytics-uuid
1423
time alibuild/aliBuild --help
1524
time alibuild/aliBuild -z test-init init zlib
1625
pushd test-init/alidist && git status && popd

ANALYTICS.md

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# aliBuild's Anonymous Aggregate User Behaviour Analytics
2+
3+
aliBuild has begun gathering anonymous aggregate user behaviour analytics and
4+
reporting these to Google Analytics. You will be notified the first time you
5+
run an aliBuild with this feature enabled.
6+
7+
## Why?
8+
Resources which we can dedicate to support multiple architectures and compilers are
9+
limited. As a result, we do not have the resources to do detailed user
10+
studies of aliBuild users to decide on how best to design future features and
11+
prioritise current work. Anonymous aggregate user analytics allow us to
12+
prioritise fixes and features based on how, where and when people use aliBuild.
13+
For example:
14+
15+
- if a recipe is widely used and is failing often it will enable us to
16+
prioritise fixing that recipe over others.
17+
- collecting the OS version allows us to decide what versions of Linux / OS X to
18+
prioritise and support and identify build failures that occur only on single
19+
versions.
20+
21+
## What?
22+
aliBuild's analytics record some shared information for every event:
23+
24+
- The aliBuild user agent e.g. `aliBuild/1.3.0 (Macintosh; x86-64 osx) Python/2.7.9`
25+
- The Google Analytics version i.e. `1`
26+
(https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#v)
27+
- The aliBuild analytics tracking ID e.g. `UA-77346950-1`
28+
(https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#tid)
29+
- A aliBuild analytics user ID e.g. `1BAB65CC-FE7F-4D8C-AB45-B7DB5A6BA9CB`.
30+
This is generated by `uuidgen` and stored in `~/.config/alibuild/analytics-uuid`
31+
This does not allow us to track individual users but does enable us to
32+
accurately measure user counts vs. event counts
33+
(https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid)
34+
- The Google Analytics anonymous IP setting is enabled i.e. `1`
35+
(https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aip)
36+
- The aliBuild application name e.g. `aliBuild` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#an)
37+
- The aliBuild application version e.g. `1.3.0` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#av)
38+
- The aliBuild analytics hit type e.g. `screenview` (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#t)
39+
40+
aliBuild's analytics records the following different events:
41+
42+
- a `screenview` hit type with the official aliBuild command you have run (with
43+
arguments stripped) e.g. `aliBuild build` (not `aliBuild build AliceO2`)
44+
- an `event` hit type with the `install` event category, the aliBuild recipe you
45+
have requested to build and any used options e.g. `AliRoot devel=AliRoot sys=cmake deps=ROOT` as the
46+
action and an event label e.g. `osx_x86-64` to indicate
47+
the OS version. This allows us to identify formulae that need fixed and where
48+
more easily.
49+
- an `event` hit type with the `BuildSuccess` event category, the aliBuild
50+
recipe invoked to install e.g. `zlib` as the action and an event label
51+
e.g. `osx_x86-64 v1.2.8 abcdef0123` to indicate the architecture, the version and
52+
the hash of the package being build.
53+
- an `event` hit type with the `BuildError` event category, the aliBuild
54+
formula that failed to install e.g. `AliRoot` as the action and an event label
55+
e.g. `osx_x86-64 master abcdef0123` to indicate the architecture, the branch / tag
56+
and the commit that failed.
57+
- an `exception` hit type with the `exception` event category, exception
58+
description of the exception name e.g. `IOError` and whether
59+
the exception was fatal e.g. `1`
60+
61+
You can also view all the information that is sent by aliBuild's
62+
analytics by setting `ALIBUILD_ANALYTICS_DEBUG=1` in your environment.
63+
Please note this will also stop any analytics being sent.
64+
65+
It is impossible for the aliBuild developers to match any particular
66+
event to any particular user, even if we had access to the aliBuild
67+
analytics user ID (which we do not). As far as we can tell it would
68+
be impossible Google to match the randomly generated aliBuild-only
69+
analytics user ID to any other Google Analytics user ID. If Google
70+
turned evil the only thing they could do would be to lie about
71+
anonymising IP addresses and attempt to match users based on IP
72+
addresses.
73+
74+
## When/Where?
75+
aliBuild's analytics are sent throughout aliBuild's execution to Google
76+
Analytics over HTTPS.
77+
78+
## Who?
79+
aliBuild's analytics are accessible to aliBuild's current maintainers
80+
and ALICE Offline Coordination.
81+
82+
## How?
83+
The code is viewable in:
84+
85+
https://github.com/alisw/alibuild/blob/master/alibuild_helpers/analytics.py
86+
87+
They are done in a separate background process and fail fast to
88+
avoid delaying any execution. They will fail immediately and silently if
89+
you have no network connection.
90+
91+
## Opting out
92+
aliBuild analytics helps us maintainers and leaving it on is
93+
appreciated. However, if you want to opt out of aliBuild's analytics,
94+
you can set this variable in your environment:
95+
96+
```sh
97+
export ALIBUILD_NO_ANALYTICS=1
98+
```
99+
100+
Alternatively, this will prevent analytics from ever being sent:
101+
102+
```sh
103+
aliBuild analytics off
104+
```
105+
106+
In case you decide you want to turn analytics back on:
107+
108+
```sh
109+
aliBuild analytics on
110+
```
111+
112+
## Thanks
113+
We would like to thank the Homebrew project as this file and the actual
114+
python reimplementation of the analytics is based on their documentation
115+
and code.

0 commit comments

Comments
 (0)