Skip to content
Snippets Groups Projects
Forked from asapo / asapo
389 commits behind the upstream repository.
Marc-Olivier Andrez's avatar
Marc-Olivier Andrez authored
The CI job `test-services-linux-debug` executes the tests using CMake,
including the Go tests. The command used to execute the Go tests is
defined in `CMakeModules/testing_go.cmake` Ln14: `go test ${test_source_files}`.
The `go test` command first compiles the tests and then run them.
Compiling the tests needs the file
`common/go/src/asapo_common/version/version_lib.go` to correctly define
 the versions of the different communication protocols and components:

```go
package version

// Default build-time variable for library-import.
// This file is overridden on build with build-time informations.
func init(){
	version   = "100.0.wip-fix-tests, build 5100fbee"
	consumerProtocolVersion = "v0.6"
	producerProtocolVersion = "v0.6"
	discoveryApiVersion = "v0.1"
	authorizerApiVersion = "v0.2"
	ftsApiVersion = "v0.2"
	brokerApiVersion = "v0.6"
}
```

The file `common/go/src/asapo_common/version/version_lib.go` is
generated when running CMake. So the file is generated in the CI job
`build-services-linux-debug`, not in `test-services-linux-debug`.

This commit ensures that the file is copied from the CI job
`build-services-linux-debug` to the CI job `test-services-linux-debug`
so that `go test` can use it when compiling and running the tests. If
the file does not exist, `go test` won't be able to compile the tests.
65e7f0bf
History

ASAP::O - High performance distributed streaming platform

The client packages are located here. Use the following token to get them: f3Q1jP6z8wZy85TUsD8R.

Example:

pip install asapo-consumer --index-url https://\_\_token\_\_:f3Q1jP6z8wZy85TUsD8R@gitlab.desy.de/api/v4/projects/2236/packages/pypi/simple

Folder structure

Microservices

  • authorizer - authorization (Go)
  • broker - server for consumer clients (Go)
  • discovery - discovery service (Go)
  • file_transfer - file transfer service to deliver files to clients that have no access to storage (Go)
  • receiver - server for producer clients to send data to, also contains data server that is contacted by consumer clients to get data from cache (C++)

Client libraries

  • producer - producer libraries (C++, C, Python)
  • consumer - consumer libraries (C++, C, Python)

Docs & Tests

  • docs - doxygen,sphinx and site documentation
  • tests - automatic integration/e2e tests
  • docs/site/examples - examples used for site
  • examples - some outdated examples, also used for automated tests, (todo: move it somewhere)

Auxiliary folders

  • common - stuff to be shared between microservices
  • CMakeIncludes, CMakeModules, install - CMake stuff
  • config - to store various config files, also nomad jobs for tests
  • deploy - Docker files for various images, Helm files, Nomad&Consul files

Building

Prepare dependencies

depending on configuration, you might need need curllib, mongoc, google tests

  • cd 3d_party/mongo-c-driver

  • ./install.sh $(pwd)

  • sudo make -C mongo-c-driver-1.17.2 install

  • back in the asapo-dir:

  • mkdir build

  • (cd build; cmake ..)

With documentation

Need Doxygen >= 1.8.10 and sphinx

  • mkdir build
  • cd build
  • cmake -DBUILD_CPP_DOCS=ON _DBUILD_PYTHON_DOCS ..

With tests

Need googletest >= 1.8.0

  • mkdir build
  • cd build
  • cmake -DBUILD_TESTS=ON ..

The software is MIT licensed (see LICENSE.txt) and uses third party libraries that are distributed under their own terms (see LICENSE-3RD-PARTY.txt)

with non-standard 3rd party libraries paths

  • cmake -Dlibmongoc-static-1.0_DIR=... -Dlibbson-static-1.0_DIR=... -DLIBCURL_DIR=... ...

compile

  • make -j 4

or compile specific target only, e.g.

  • make -j 4 receiver