Commit Graph

1182 Commits

Author SHA1 Message Date
Simone Basso
946289d6fe
Use more general ooni/probe-engine API (#67)
No functional change, just importing less stuff and meddling
much less with the internals of ooni/probe-engine.
2019-10-28 14:05:05 +01:00
Simone Basso
1b9bc457b9
Merge pull request #65 from ooni/issue/64
build.sh: produce same release as before
2019-10-03 23:40:38 +02:00
Simone Basso
2986cbcb25
Update build.sh
Co-Authored-By: Sarath <sarath.ms@gmail.com>
2019-10-03 23:34:41 +02:00
Simone Basso
a8f8c65ffb build.sh: produce same release as before 2019-10-03 20:33:20 +02:00
Simone Basso
1d8becf50f
Merge pull request #62 from ooni/feature/release
Publish code used to generate v3.0.0-beta.4
2019-10-03 12:25:16 +02:00
Simone Basso
839b51237d Temporarily remove goreleaser
For now, I'm fine with `./build.sh release`. When we'll be fully
written in Go, we'll explorer more perks.
2019-10-03 12:15:19 +02:00
Simone Basso
f3193b4a7c build.sh: add target to build release
While there, remove non actionable warning.
2019-10-03 11:45:49 +02:00
Simone Basso
a488c8d2a3 version.go: actually bump version
Classic mistake: you don't bump the version.

We need https://github.com/ooni/probe-cli/issues/43.
2019-10-03 11:22:13 +02:00
Simone Basso
7cde93fca4
Make sure ooniprobe show <id> is WAI (#61)
1. the description of the command and the helper function are
clear hints that the command is intended to show a single JSON
measurement at a time (also the use case seems clear) [*]

2. the function used to read lines was failing for all my
measurements that take input. Since that was not the optimal
pattern anyway, use a better pattern to fix it.

3. some changes are automatically applied by my editor (VSCode
with the Go plugin) and I am fine with them.

4. while reading code, I also applied my preferred pattern
wrt whitespaces, i.e.: no whitespace inside functions, if a
function feels too long in this way, just break it.

Closes #57

[*] Even if we want to show many measurements at a time, which
does not seem needed, given the UI patterns, this functionality
won't be P0. What is P0 is to bless a new beta and give to
@sarathms binaries for all archs that support a basic `show`.
2019-10-03 11:18:07 +02:00
Simone Basso
f3865d2ec0
Upgrade to ooni/probe-engine@v0.1.1 (#60) 2019-10-03 09:43:25 +02:00
Simone Basso
23c8df1f0c
Rename the binary as ooniprobe (#58)
While there run the build container as unpriv user.
2019-10-02 19:27:15 +02:00
Arturo Filastò
f425d3f007 Implement the show command (#53) 2019-10-02 18:23:14 +02:00
Simone Basso
b9b555ba68 Integrate further with ooni/probe-engine: episode two (#46)
* utils/geoip.go: use github.com/ooni/probe-engine

Let's start using the engine by rewriting utils/geoip.go to
be just a thin wrapper around the engine functionality.

* Ready for review

* Checkpoint: the im tests are converted

Still have some doubts with respect to the variables that
are passed to MK via probe-engine. Will double check.

* fix(i/c/r/run.go): write the correct logic

* nettests: one more comment and also fix a format string

* Tweak previous

* progress

* Fix doofus

* better comment

* XXX => actionable comment

* Add glue to simplify test keys management

Making the concept of measurement more abstract in the engine is
not feasible because, when submitting a measurement, we need to
modify it to update the report ID and the measurement ID. Therefore,
returning a serialized measurement is not a good idea. We will
keep using a model.Measurement in the engine.

Changing model.Measurement.TestKeys's type from a `interface{}`
pointing to a well defined data structure to `map[string]interface{}`
is a regression because means that we are moving from code that
has a clear and defined structure to code that is more complicated
to parse and validate. Since we're already suffering havily from
the lack of a good schema, I'm not going to make the situation
worst by worsening the engine. At least for ndt7 and psiphon, we
now have a good schema and I don't want to lose that.

However, the current code in this repository is expecting the
test keys to be a `map[string]interface{}`. This choice was
dictated by the fact that we receive a JSON from Measurement Kit
and by the fact that there's not a clear schema.

To solve this tension, in this commit I am going to write glue
adapter code that makes sure that the TestKeys of a Measurement
are converted to `map[string]interface{}`. This will be done
using a type cast where possible and JSON serialization and parsing
otherwise. In a perfect world, glue is not a good idea, but in a
real world it may actually be useful.

When all tests in the engine will have a clear Go data structure,
we'll then remove the glue and just cast to the proper data
structure from `interface{}` where required.

* nettests/performance: use probe-engine

* go.{mod,sum}: upgrade to latest probe-engine

* nettests/middlebox: use ooni/probe-engine

* Update to the latest probe-engine

* web_connectivity: rewrite to use probe-engine

* Cosmetic change suggested by @hellais

* nettests/nettests.go: remove unused code

* nettests/nettests.go: fix progress

* nettests/nettests.go: remove go-measurement-kit code

* We don't depend on go-measurement-kit anymore

* Improve non-verbose output where possible

See also: https://github.com/measurement-kit/measurement-kit/issues/1856

* Make web_connectivity output pleasant

* Update to the latest probe-engine

* nettests/nettests.go: honour sharing settings

* Update to the latest probe-engine

* Use log.WithFields for probe-engine

* Update go.mod go.sum

* Revert "Update go.mod go.sum"

This reverts commit 5ecd38d8236f4a4e9b77ddb8e8a0d1e3cdd4b818.

* Revert "Revert "Update go.mod go.sum""

This reverts commit 6114b31eca98826112032776bd0feff02d763ecd.

* Upgrade ooni/probe-engine

* Unset GOPATH before running go build commands

* Dockefile: fix linux build by using latest

* Update to the latest ooni/probe-engine

```
go get -u github.com/ooni/probe-engine
go mod tidy
```

* Repair build
2019-08-15 18:08:43 +02:00
Simone Basso
df629237be
Use ooni/probe-engine: episode 1 (#42) 2019-05-23 16:38:46 +02:00
Arturo Filastò
eb4fec2f21 Add commands for making a release 2019-05-16 15:41:57 +02:00
Arturo Filastò
e9bd5d8eb5
Merge pull request #33 from ooni/release/3.0.0-beta.3
Bump version
2019-05-16 15:00:17 +02:00
Arturo Filastò
23423cd74f Put MK loglevel to info 2019-05-16 10:22:29 +02:00
Arturo Filastò
6afc8bcc94 Remove reference to caBundlePath 2019-05-15 19:30:10 +02:00
Arturo Filastò
4ead3802a4 Bump MK verbosity and print SSL_CERT value 2019-05-15 19:29:34 +02:00
Arturo Filastò
2cda2d9639 Bump version 2019-05-15 19:26:24 +02:00
Arturo Filastò
9155ec95ae Remove getCaBundlePath 2019-05-15 19:25:23 +02:00
Arturo Filastò
9ad7c6507a Remove shutil tests 2019-05-15 18:13:34 +02:00
Arturo Filastò
826822df31 Copy and delete instead of rename
Fixes: https://github.com/ooni/probe-cli/issues/21
2019-05-15 18:06:09 +02:00
Arturo Filastò
dbed661357 Vendor shutil from: bcacb06fec 2019-05-15 18:05:51 +02:00
Arturo Filastò
5134d9e0de Skip publish 2019-05-15 17:55:40 +02:00
Arturo Filastò
3f509370f2 Add release command 2019-05-15 17:55:11 +02:00
Arturo Filastò
a36181c9c0 Ignore dist in .dockerignore 2019-05-15 17:44:00 +02:00
Arturo Filastò
26feb2bcce Improve error reporting inside of geoip lookup functions 2019-05-15 17:36:56 +02:00
Arturo Filastò
5d0e6e6c8c Use info level MK debug 2019-05-15 16:14:01 +02:00
Arturo Filastò
356b655efd Enable debug mode 2019-05-15 15:34:36 +02:00
Arturo Filastò
f1dfe58351 Use a different env name for tests 2019-05-15 15:09:42 +02:00
Arturo Filastò
b01b038a05 Sync up goreleaser file 2019-05-15 15:05:24 +02:00
Arturo Filastò
1490d07089 Bump version number 2019-05-15 14:57:02 +02:00
Arturo Filastò
ea5feb40ec Add basic smoke test on travis 2019-05-15 14:55:47 +02:00
Arturo Filastò
72e5c99b51 Merge branch 'master' of github.com:ooni/probe-cli
* 'master' of github.com:ooni/probe-cli:
  Use MK v0.10.x, zap legacy GeoIP, build also on Linux (#29)
2019-05-15 14:48:32 +02:00
Simone Basso
9992690f8f Use MK v0.10.x, zap legacy GeoIP, build also on Linux (#29)
* Gopkg.lock: use MK v0.10.3

* ooni: stop using legacy GeoIP database files

* Some yak shaving of Makefile

1. remove now broken commands to download deps

2. also define the CXX cross compiler

* chore(dep): migrate from dep to go 1.11+ modules

See https://blog.callr.tech/migrating-from-dep-to-go-1.11-modules/

I need this to simplify my life in building for Travis.

* Introduce build.sh and repair build

In going forward, I believe we don't actually need a Makefile but I
didn't want to make such a radical change now.

* Another strategy wrt gopath

* travis: run regress tests on macOS

Closes #30
2019-05-15 15:48:06 +03:00
Arturo Filastò
70be7beecf Merge branch 'master' of github.com:ooni/probe-cli
* 'master' of github.com:ooni/probe-cli:
  Update the linux section of the install instructions
2018-10-15 16:32:03 +02:00
Arturo Filastò
dd70340b9c
Update the linux section of the install instructions 2018-10-14 21:57:21 +02:00
Arturo Filastò
23348f4358 Fix goreleaser glob matching 2018-09-27 19:32:31 +02:00
Arturo Filastò
37c7caa1f8 Bump go-measurement-kit version 2018-09-27 19:16:41 +02:00
Arturo Filastò
e5dfdfe18e Update mk dep 2018-09-27 19:10:43 +02:00
Arturo Filastò
7c8771d807 Tweak goreleaser 2018-09-27 19:06:57 +02:00
Arturo Filastò
29b382ebf3 Add basic goreleaser 2018-09-27 18:52:38 +02:00
Arturo Filastò
ec7e6f939b Remove scary warning 2018-09-27 18:42:21 +02:00
Arturo Filastò
ec337e8186 Bump to beta.1 2018-09-27 18:39:35 +02:00
Arturo Filastò
34556dcbf1 Add support for running all tests with ooni run 2018-09-27 18:38:37 +02:00
Arturo Filastò
1b90b6f1ec Bump to alpha.3 2018-09-27 11:43:13 +02:00
Arturo Filastò
8916ff8398 Add note about the testKeys extraction function 2018-09-27 11:42:55 +02:00
Arturo Filastò
1879f8e961 Make the testKeys extractions methods more robust 2018-09-27 11:40:57 +02:00
Arturo Filastò
bc5fe7d8bf Fix bug in report_create event 2018-09-27 11:12:22 +02:00