Comments (5)
This means you're trying to create two resource pools with the same name. Since pools should only be created at startup, and this is being reported as a test result, you're probably trying to create a new pool for each test.
The pools are memory-only, so restarting will clear the state.
Make sure that your my_tests
function doesn't create any pools (and doesn't call any function that takes a ~logs
argument - it's possible that one of them creates a pool internaly).
from datakit.
Oh okay, I accidentally still had some new pools apparently. Looking out for ~logs
helped, thanks!
from datakit.
I was wrong, it still doesn't work. I have the following code (which, in many ways, is analogous to the one in self-ci
):
module Tests = struct
open Term.Infix
let repos =
object(_self)
method main_repo = Git.v ~logs ~remote:"/mnt/myproject_remote" "/data/repos/myproject"
end
let images src =
let timeout = (30. *. minute) in
let tests_dockerfile = Docker.create ~logs ~pool ~timeout ~label:"tests_docker" "Dockerfile" in
object(_self)
method tests = src >>= Docker.build ?from:None tests_dockerfile
end
let commands =
let timeout = (30. *. minute) in
object(_self)
method run_tests = Docker.command ~logs ~pool ~timeout ~label:"tests" ~network:"host" []
end
let check_run term =
term >|= fun _ -> "Run succeeded"
let tests target =
let src = Git.fetch_head repos#main_repo target in
let images = images src in
[
"build_and_run_tests", check_run (images#tests >>= Docker.run commands#run_tests);
]
end
let projects = [
Config.project ~id:"me/myproject" (Tests.tests)
]
At first it runs fine, but if I restart the CI I get "Assert_failure ci/src/cI_monitored_pool.ml:44:2"
. I might be missing some trivial point, I am fairly new to OCaml.
from datakit.
commands#run_tests
is a method call. It will create a new cache every time you run it. You probably want something like:
module Commands = struct
let timeout = 30. *. minute
let run_tests = Docker.command ~logs ~pool ~timeout ~label:"tests" ~network:"host" []
end
from datakit.
Worked, thanks!
from datakit.
Related Issues (20)
- Invalid use of `${ROOT}` HOT 2
- check version
- Datakit using irmin store not writing to repository HOT 1
- Minor release with s/per_file/per_module/ ? HOT 3
- "git commit" seems to break the transaction interface HOT 4
- Unable to run CI example (permission denied) HOT 7
- Unable to run DataKit Local-Git bridge HOT 2
- Unix.ENAMETOOLONG when using datakit-bridge-local-git HOT 3
- Unix.EROFS while running self-ci locally HOT 8
- DataKitCI: configure docker run HOT 5
- CI: Rebuilding a job doesn't cancel its childen jobs HOT 5
- Can't create new live log on branch HOT 13
- CI: local-bridge does not rebuild on new commit HOT 3
- CI: local state repo HOT 2
- CI: unable to use Git.run HOT 2
- Datakit-CI is rebuilding PR on title edit HOT 3
- Irmin.merge_head: conflict, retrying (223684) (100% CPU) HOT 10
- Irmin 2.0.0
- datakit-client is not compatible with result 1.5 on OCaml 4.08+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datakit.