Time for the yearly barrage of “Setup CI”…“Fix CI” commits.
That is my experience with basically every CI service out there.
Time for the yearly barrage of “Setup CI”…“Fix CI” commits.
That is my experience with basically every CI service out there.
Testcontainers uses ‘ryuk’ to clean up containers and it needs docker socket mounted within its container to work. So if you had any hardening config that prevents the docker socket access within a container e.g user namespace or SELinux then Testcontainers doesn’t work.
And I think it would be nice if Testcontainers ‘just worked’ with Podman without any additional steps.
Nothing else. Though docker socket issue was important enough.
It wants you to put dummy details as fast as you can.
It is a game, but it might also be a card grabber.
I did not make this, and you’re supposed to put dummy details there. Don’t put actual credit card information.
Thanks man, my brain was short-circuited on Testcontainers so I couldn’t write better. Also I am stealing the title.
I don’t get it, how would a database container run your unit tests? And unless you know some secret option to stop the database after, say, it is idle for a few seconds, it will continue running.
The purpose is to test database dependent code by spinning up a real database and run your code against that.
For me the value of podman is how easily it works without root. Just install and run, no need for sudo or adding myself to docker group.
I use it for testing and dev work, not for running any services.
No… too hard.
npm ruin dev
running shittier could be a nice prank… depending on how often it gets typed.
That advertisement would be interpreted as Node C
’s advertisement.
The plan is to treat public keys as node’s identity and trust mechanism similar to OpenPGP (e.g. include any node key signed by a master key as a cluster member)
Right now, none of the encryption part is done and it is not a priority right now. I need to first implement transitive node detection, actually forward packets between nodes, some way to store and manage routes, and then trust and encryption mechanisms before I’d dare to test this stuff on a real network.
The UI is desktop only for now, I’ll make the mobile UI some day.
I didn’t know the answer either, but usually you can compose solution from solutions of smaller problems.
solution(0): There are no disks. Nothing to do. solution(n): Let’s see if I can use solution(n-1) here. I’ll use solution(n-1) to move all but last disk A->B, just need to rename the pins. Then move the largest disk A->C. Then use solution(n-1) to move disks B->C by renaming the pins. There we go, we have a stack based solution running in exponential time.
It’s one of the easiest problem in algorithm design, but running the solution by hand would give you a PTSD.
Replacing “Programmers:” with “Program:” is more accurate.
Tower of Hanoi is actually easy to write program for. Executing it on the other hand…
I was thinking along the lines of
Plenty of libraries can build the XML using structs/classes. e.g. with serde:
//Data type for row
#[derive(serde::Serialize)]
pub struct Foo {
pub status: String,
pub name: String,
}
//Example row
let ent = Foo {
status: "paid".into(),
name: "bob".into(),
}
//Example execution
sqlx::query(&serde_xml_rs::to_string(&InsertStmt{
table: "foo".into(),
value: &ent,
})?).execute(&conn)?;
Or with jackson-dataformat-xml:
//Data type for row
public class Foo {
public string status;
public string name;
}
//Example row
Foo ent = new Foo();
foo.status = "paid";
foo.value = "bob";
//Example execution
XmlMapper xmlMapper = new XmlMapper();
String xml = xmlMapper.writeValueAsString(new InsertStmt("foo", ent));
try (Statement stmt = conn.createStatement()) {
stmt.executeUpdate(xml)
}
I don’t do JS (yet) but maybe JSX could also do similar things with XML queries.
No more matching $1, $2, … (or ?
for mysql) with individual columns, I could dump entire structs/objects into a query and it would work.
Better than parameterized queries. Yes, we have stuff like query("INSERT INTO table(status, name) VALUES ($1, $2);").bind(ent.status).bind(ent.name).execute...
, but that’s kind of awful isn’t it?
With XML queries, we could use any of the XML libraries we have to create and manipulate XML queries without risking ‘XML injection’. e.g we could convert ordinary structs/classes into column values automatically without having to use any ORM.
I actually like this. This would allow reuse of all the infrastructure we have around XML. No more SQL injection and dealing with query parameters? Sign me up!
We test our code locally, but we cannot test the workflow. By definition, testing the workflow has to be done on a CI-like system.
There is nektos/act for running github actions locally, it works for simple cases. There still are many differences between act and github actions.
It might be possible for a CI to define workflow steps using Containerfile/Dockerfile. Such workflows would be reproducible locally.