Skip to content

chore: remove all earthly-related files and references#399

Open
Dav-14 wants to merge 1 commit intomainfrom
chore/remove-earthly
Open

chore: remove all earthly-related files and references#399
Dav-14 wants to merge 1 commit intomainfrom
chore/remove-earthly

Conversation

@Dav-14
Copy link
Contributor

@Dav-14 Dav-14 commented Feb 23, 2026

Summary

  • Deleted Earthfile (root) and tools/utils/Earthfile
  • Deleted .earthly/ directory (helm configuration used by earthly deploy targets)
  • Removed earthly/actions-setup and git branch workaround from .github/actions/env/action.yml
  • Removed earthly from flake.nix dev dependencies
  • Replaced earthly-based staging deploy with argocd CLI approach (matching membership-api pattern):
    • Added deploy-staging Just target calling argocd directly
    • Added Deploy CI job with Tailscale VPN connectivity
    • Added argocd to flake.nix dev dependencies

Test plan

  • CI passes (Dirty, Tests, GoReleaser jobs)
  • Verify no remaining earthly references in the codebase
  • Verify Deploy job triggers on main and syncs the ArgoCD application

🤖 Generated with Claude Code

@Dav-14 Dav-14 requested a review from a team as a code owner February 23, 2026 12:01
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 02972bf and afbfb1d.

⛔ Files ignored due to path filters (10)
  • .earthly/configuration/Chart.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/elasticsearch-secret.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/postgres-secret.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/settings.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/temporal-secret.yaml is excluded by !**/*.yaml
  • .earthly/configuration/values.yaml is excluded by !**/*.yaml
  • .earthly/k8s-versions.yaml is excluded by !**/*.yaml
  • .github/actions/env/action.yml is excluded by !**/*.yml
  • .github/workflows/main.yml is excluded by !**/*.yml
  • .github/workflows/releases.yml is excluded by !**/*.yml
📒 Files selected for processing (5)
  • .earthly/configuration/.helmignore
  • Earthfile
  • Justfile
  • flake.nix
  • tools/utils/Earthfile
💤 Files with no reviewable changes (3)
  • tools/utils/Earthfile
  • Earthfile
  • .earthly/configuration/.helmignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • Justfile

Walkthrough

Removed Earthly build files and .helmignore, replaced earthly with argocd in the Nix dev shell, and updated the Justfile to remove the Earthly-driven deploy and add a deploy-staging target plus a docs-source flag change.

Changes

Cohort / File(s) Summary
Earthly configs removed
Earthfile, tools/utils/Earthfile, .earthly/configuration/.helmignore
Deleted Earthly build orchestration files and the Helm ignore file (all ignore patterns removed). Removes multi-stage Earthly targets for codegen, builds, artifact saving, and deployment orchestration.
Build orchestration / CI scripts
Justfile
Removed deploy target; added public deploy-staging target (ArgoCD-focused). Updated generate-docs to include --source-path=api/formance.com/v1beta1.
Development environment
flake.nix
Replaced earthly with argocd in stablePackages for devShells.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Dev as Developer/CI
participant Just as Justfile
participant Helm as Helm
participant Reg as Registry
participant Argo as ArgoCD

Dev->>Just: trigger deploy-staging(TAG)
Just->>Argo: authenticate & update app image tag
Just->>Helm: package/render chart (optional)
Helm->>Reg: push chart/image
Argo->>Reg: pull chart/image
Argo->>Dev: report sync status

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I nudged Earthly out of sight,
Switched my whiskers to Argo's light,
Charts and tags now hop in line,
Staging hums — a tidy sign,
I munch a carrot, build's alright. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: removing all Earthly-related files and references, which is the main focus of the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing specific details about deleted files, removed references, and the replacement strategy with ArgoCD.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/remove-earthly

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Justfile (1)

75-85: Consider adding pipefail for robust error handling.

The version extraction pipeline on line 80 could silently produce an empty string if grep fails (e.g., malformed Chart.yaml), since only the last command's exit status is checked without pipefail. This would result in an invalid version like -<suffix>.

♻️ Suggested improvement
 helm-package suffix='': helm-update
   #!/bin/bash
-  set -e
+  set -eo pipefail
   for dir in $(ls -d helm/*); do
     if [ -n "{{suffix}}" ]; then
       version=$(grep '^version:' "$dir/Chart.yaml" | awk '{print $2}' | tr -d '"')
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Justfile` around lines 75 - 85, In the helm-package recipe in the Justfile,
enable robust shell error handling by adding pipefail (e.g., change the shebang
block to use set -euo pipefail) so the grep|awk|tr pipeline in the version
extraction will fail the script if any stage fails; additionally, after
computing the version variable in the branch that uses suffix, validate that
version is non-empty and exit with an error (or log and abort) before calling
helm package to avoid producing an invalid "-{{suffix}}" package; key
identifiers: the helm-package Justfile recipe, the version variable computed
from grep/awk/tr, and the helm package invocation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Justfile`:
- Around line 75-85: In the helm-package recipe in the Justfile, enable robust
shell error handling by adding pipefail (e.g., change the shebang block to use
set -euo pipefail) so the grep|awk|tr pipeline in the version extraction will
fail the script if any stage fails; additionally, after computing the version
variable in the branch that uses suffix, validate that version is non-empty and
exit with an error (or log and abort) before calling helm package to avoid
producing an invalid "-{{suffix}}" package; key identifiers: the helm-package
Justfile recipe, the version variable computed from grep/awk/tr, and the helm
package invocation.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2bee0b3 and 4b6cc2d.

⛔ Files ignored due to path filters (10)
  • .earthly/configuration/Chart.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/elasticsearch-secret.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/postgres-secret.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/settings.yaml is excluded by !**/*.yaml
  • .earthly/configuration/templates/temporal-secret.yaml is excluded by !**/*.yaml
  • .earthly/configuration/values.yaml is excluded by !**/*.yaml
  • .earthly/k8s-versions.yaml is excluded by !**/*.yaml
  • .github/actions/env/action.yml is excluded by !**/*.yml
  • .github/workflows/main.yml is excluded by !**/*.yml
  • .goreleaser.yml is excluded by !**/*.yml
📒 Files selected for processing (5)
  • .earthly/configuration/.helmignore
  • Earthfile
  • Justfile
  • flake.nix
  • tools/utils/Earthfile
💤 Files with no reviewable changes (4)
  • .earthly/configuration/.helmignore
  • flake.nix
  • Earthfile
  • tools/utils/Earthfile

@Dav-14 Dav-14 changed the base branch from main to fix/ci-helm-publish-override February 23, 2026 12:13
Base automatically changed from fix/ci-helm-publish-override to main February 23, 2026 12:14
@Dav-14 Dav-14 force-pushed the chore/remove-earthly branch from 1eaee01 to c47041b Compare February 23, 2026 12:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Justfile (1)

75-87: Use dot-separated prerelease identifiers when suffixing chart versions.

When appending a suffix to a pre-release version, use a dot (.) separator instead of a hyphen to align with SemVer best practices. For example, 1.2.3-rc.1.{{suffix}} is preferred over 1.2.3-rc.1-{{suffix}} because dot-separated identifiers preserve numeric ordering in version constraints (e.g., rc.1 sorts before rc.2).

🔧 Suggested adjustment
   for dir in $(ls -d helm/*); do
     if [ -n "{{suffix}}" ]; then
       version=$(grep '^version:' "$dir/Chart.yaml" | awk '{print $2}' | tr -d '"')
-      pushd "$dir" && helm package . --version "${version}-{{suffix}}" && popd
+      if [[ "$version" == *-* ]]; then
+        pkg_version="${version}.{{suffix}}"
+      else
+        pkg_version="${version}-{{suffix}}"
+      fi
+      pushd "$dir" && helm package . --version "$pkg_version" && popd
     else
       pushd "$dir" && helm package . && popd
     fi
   done
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Justfile` around lines 75 - 87, The helm-package recipe currently appends the
suffix with a hyphen regardless of whether the Chart.yaml version is a
pre-release; modify the suffix logic in helm-package (the shell block using
variable version from Chart.yaml) to detect pre-release versions (presence of
'-') and, if present, append the suffix with a dot (e.g.,
"${version}.{{suffix}}"), otherwise keep the existing hyphen form
("${version}-{{suffix}}"); update the packaging command in helm-package to use
the chosen version string when calling helm package.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Justfile`:
- Around line 75-87: The helm-package recipe currently appends the suffix with a
hyphen regardless of whether the Chart.yaml version is a pre-release; modify the
suffix logic in helm-package (the shell block using variable version from
Chart.yaml) to detect pre-release versions (presence of '-') and, if present,
append the suffix with a dot (e.g., "${version}.{{suffix}}"), otherwise keep the
existing hyphen form ("${version}-{{suffix}}"); update the packaging command in
helm-package to use the chosen version string when calling helm package.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4b6cc2d and 11769e2.

⛔ Files ignored due to path filters (1)
  • .github/workflows/main.yml is excluded by !**/*.yml
📒 Files selected for processing (2)
  • Justfile
  • flake.nix
🚧 Files skipped from review as they are similar to previous changes (1)
  • flake.nix

@Dav-14 Dav-14 force-pushed the chore/remove-earthly branch 6 times, most recently from 3dfaf90 to 02972bf Compare February 23, 2026 12:25
- Delete Earthfiles and .earthly/ directory
- Remove earthly setup from CI action
- Replace earthly deploy with argocd CLI via Just target
- Replace earthly with argocd in flake.nix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Dav-14 Dav-14 force-pushed the chore/remove-earthly branch from 02972bf to afbfb1d Compare February 23, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants