u/guettli

▲ 0 r/Nix

From Nix to Dagger

I think I will switch from Nix to Dagger.

I guess I will still use nix profile add nixpkgs#... sometimes in the future, but overall Dagger solves my issue in way that is easier to understand for me.

Feel free tell me why I am wrong.

I configured Dagger so that my local environment and the environment in CI use the same Dagger server.

When I run tests locally, then commit and push to PR, then the tests in CI dont get executed because they are a cache-hit (exactly same input, so no need to execute it). I love it.

reddit.com
u/guettli — 6 days ago

Fast Flutter CI?

How to get a fast CI for Flutter?

I created a small application. There are unit tests, no issue they are that.

There are tests which use an android emulator. I don't run them in CI yet, because they need so many dependencies.

How do you handle that?

Do you spin up a Android emulator for each push to a PR?

reddit.com
u/guettli — 14 days ago

I am looking at the available locations of ARM (caxNN) servers:

❯ hcloud server-type list -o=columns=name,location,location_available,location_recommended| grep -P 'cax|NAME'   
NAME    LOCATION                          LOCATION AVAILABLE                LOCATION RECOMMENDED
cax11   fsn1, nbg1, hel1
cax21   fsn1, nbg1, hel1
cax31   fsn1, nbg1, hel1
cax41   fsn1, nbg1, hel1

No location has them....

Is this a temporary issue?

reddit.com
u/guettli — 17 days ago

Today I learned that this command shows an overview of the server types and the availability in locations:

❯ hcloud server-type list -o=columns=name,location,location_available,location_recommended                       
NAME    LOCATION                          LOCATION AVAILABLE                LOCATION RECOMMENDED
cpx11   ash, hil                          ash, hil
cpx21   ash, hil                          ash, hil
cpx31   ash, hil                          ash, hil
cpx41   ash, hil                          hil
cpx51   ash, hil                          hil
cax11   fsn1, nbg1, hel1                  nbg1
cax21   fsn1, nbg1, hel1
cax31   fsn1, nbg1, hel1
cax41   fsn1, nbg1, hel1
ccx13   fsn1, nbg1, hel1, ash, hil, sin   fsn1, nbg1, hel1, ash, hil, sin   hel1
ccx23   fsn1, nbg1, hel1, ash, hil, sin   fsn1, nbg1, hel1, hil, sin        hel1
ccx33   fsn1, nbg1, hel1, ash, hil, sin   fsn1, nbg1, hel1, hil, sin        hel1
ccx43   fsn1, nbg1, hel1, ash, hil, sin   fsn1, nbg1, hel1, hil, sin        hel1
ccx53   fsn1, nbg1, hel1, ash, hil, sin   fsn1, nbg1, hel1, hil, sin        hel1
ccx63   fsn1, nbg1, hel1, ash, hil, sin   fsn1, nbg1, hel1, sin             hel1
cpx12   sin                               sin
cpx22   fsn1, nbg1, hel1, sin             fsn1, nbg1, hel1, sin             hel1
cpx32   fsn1, nbg1, hel1, sin             fsn1, nbg1, hel1, sin             hel1
cpx42   fsn1, nbg1, hel1, sin             fsn1, nbg1, hel1, sin             hel1
cpx52   fsn1, nbg1, hel1, sin             fsn1, nbg1, hel1, sin             hel1
cpx62   fsn1, nbg1, hel1, sin             fsn1, nbg1, hel1, sin             hel1
cx23    fsn1, nbg1, hel1                  fsn1, nbg1, hel1                  hel1
cx33    fsn1, nbg1, hel1                  nbg1, hel1                        hel1
cx43    fsn1, nbg1, hel1                  nbg1, hel1                        hel1
cx53    fsn1, nbg1, hel1
reddit.com
u/guettli — 18 days ago

I accidentally deleted a namespace in a Kubernetes testing cluster. Luckily, it was only a test environment, but it made me wonder how this should be prevented in a safer way.

What are the best practices to protect namespaces from accidental deletion?

Finalizers won't help. This is too late.


Best answer, my pov:

Yes you can do with CEL expressions using validatingadmissionpolicy https://kubernetes.io/docs/reference/access-authn-authz/validating-admission-policy/

Backup, GitOps, RBACs are useful, too. But they don't prevent the deletion of a namespace. Kyverno would, but validating admission policy is easier.

reddit.com
u/guettli — 24 days ago

My Flutter app (Flutter 3.41.6, release APK) crashed immediately on Android 12 (Motorola) with no Dart error — just a native crash:

F libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
F DEBUG: #00 pc libdartjni.so (FindClassUnchecked+68)
F DEBUG: #01 pc libdartjni.so (FindClass+16)

After debugging, the root cause: path_provider_android 2.3.x switched to package:jni to call Android APIs. My app opens the SQLite database in a background isolate via NativeDatabase.createInBackground (drift). When that isolate calls getApplicationSupportDirectory(), it triggers JNI from a non-main isolate — libdartjni.so isn't initialized there → null pointer dereference → crash.

Workaround: Pin path_provider_android to <2.3.0 in dependency_overrides.

dependency_overrides:
  path_provider_android: ">=2.2.0 <2.3.0"

Pinning is not a long-term solution ...

Is this a known issue - how would you solve that?

reddit.com
u/guettli — 25 days ago

I developed an app which works on Linux and in the Android emulator.

But when I download the APK on my phone, and then install and run it. It crashes immediately.

Why?

I would like to see an error message, so that I can fix it.

How to get to the root cause of the crash?

Are there tools which can help? I mean open source tools (not sentry or similar)

reddit.com
u/guettli — 26 days ago

For mobile phones, I’m looking for a gesture-based way to let users choose an action from a menu tree.

Concept

  • The user touches the screen and keeps their finger down.
  • As soon as the touch is detected, the first menu level appears in a circular layout around the finger.
  • The user slides toward a first-level option.
  • After selecting it, the corresponding sub-items appear.
  • Optionally, a third level can appear for more detailed choices.

To keep the interaction usable, each menu level should contain no more than 7 items.

Example

First level

  1. Mark as “done” (requires sub-selection)
  2. Snooze (days)
  3. Snooze (weeks)
  4. Snooze (months)
  5. Move item

Sub-selections

1. Mark as “done”

  • 1.1 Delete item
  • 1.2 Delete and mark as junk
  • 1.3 Archive

2. Snooze (days)

  • 2.1.1 Snooze 1 day

  • 2.1.2 Snooze 2 days

  • 2.1.7 Snooze 7 days

  • 2.2.1 Snooze 8 days

  • 2.2.7 Snooze 14 days

3. Snooze (weeks)

  • 3.1.1 Snooze 1 week
  • … (same structure as days)

4. Snooze (months)

  • 4.1.1 Snooze 1 month
  • … (same structure as days)

5. Move item

  • 5.1 Move to Folder A
  • 5.2 Move to Folder B

Does something like this already exist?

reddit.com
u/guettli — 26 days ago