Skip to content

feat: deactivate git-server where not needed - #3718

Merged
CasLubbers merged 11 commits into
mainfrom
APL-2194
Oct 1, 2026
Merged

CasLubbers merged 11 commits into
mainfrom
APL-2194

Conversation

@merll

@merll merll commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

📌 Summary

This PR sets a default value for apps.git-server.enabled in the bootstrap process, depending whether the internal Git server is needed (either URL unset, or explicitly set to the internal Git URL) or an external Git source is used. Explicit input values remain unchanged.

A one-off migration is added for existing clusters which are running on an external Git server, but still have the platform built-in Git server enabled. It deactivates the app.

When migrating an internal to an external Git source, git-server is switched off by a values change in the API. This is provided by the following feature branch: linode/apl-api#1098

🔍 Reviewer Notes

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The bootstrap change breaks existing test expectations, and the new migration behavior lacks coverage.

Review effort: Balanced
Findings: 2 Low severity

Open (2)
What changed in this PR

Centralizes Git repository source detection and disables the built-in Git server when external Git is configured.

Changes:

  • Adds derived Git source classification for templates.
  • Defaults Git server off and adds bootstrap/migration handling.
  • Advances the values specification to version 75.

Template comparison could not run because the required tsx dependency was unavailable.

File Description
values/​team-ns/​team-ns.gotmpl Uses derived Git source classification.
values/​argocd/​argocd-raw.gotmpl Selects Argo CD credentials by Git source.
values-changes.yaml Registers migration version 75.
tests/​fixtures/​env/​settings/​versions.yaml Updates fixture specification version.
src/​cmd/​migrate.ts Disables Git server for external repositories.
src/​cmd/​bootstrap.ts Enables Git server for internal bootstrap configurations.
helmfile.d/​snippets/​derived.gotmpl Derives Git source and effective enablement.
helmfile.d/​snippets/​defaults.yaml Defaults Git server to disabled.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/cmd/bootstrap.ts
Comment thread src/cmd/migrate.ts
@merll
merll requested a balanced review from Copilot September 30, 2026 13:55
@linode linode deleted a comment from svcAPLBot Sep 30, 2026
@merll
merll marked this pull request as draft September 30, 2026 13:56
@merll
merll marked this pull request as ready for review September 30, 2026 13:56
@svcAPLBot

Copy link
Copy Markdown
Contributor

Comparison of Helm chart templating output:

# New file added: apl-network-policies/templates/networkpolicies/git-server.yaml
# Old file deleted: git-server-git-server
# Old file deleted: git-server-git-server-artifacts
# otomi-api/templates/configmap.yaml

@@ data.VERSIONS @@
! ± value change in multiline text (one insert, one deletion)
  {
    "api": "main",
    "aplCharts": "main",
    "console": "main",
    "consoleLogin": "main",
    "core": "main",
-   "specVersion": 74,
+   "specVersion": 75,
    "tasks": "main",
    "tools": "main",
    "tty": "1.2.8"
  }

# otomi-api/templates/deployment.yaml

# rabbitmq-cluster-operator/templates/messaging-topology-operator/validating-webhook-configuration.yaml

# values-repo.yaml

@@ versions.specVersion @@
! ± value change
- 74
+ 75

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Bootstrap persists a sticky enablement override, and the migration’s internal/external behavior lacks tests.

Review effort: Balanced
Findings: 1 Medium severity · 2 Low severity

Open (3)

Comment thread src/cmd/bootstrap.ts
@merll
merll requested a balanced review from Copilot October 1, 2026 08:18
@merll merll changed the title feat: deactivate git-server when not needed feat: deactivate git-server where not needed Oct 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Bootstrap persistence and migration behavior can respectively prevent later deactivation and overwrite explicit user enablement.

Review effort: Balanced
Findings: 2 Medium severity · 2 Low severity

Open (4)

Comment thread src/cmd/migrate.ts
@merll
merll requested a balanced review from Copilot October 1, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Bootstrap can disable the internal Git service when partial external Git input falls back to internal configuration, and migration coverage is missing.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (4)

Comment thread src/cmd/bootstrap.ts

@CasLubbers CasLubbers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

git-server was not enabled when installing through BYO-Git

@CasLubbers
CasLubbers merged commit 8471caa into main Oct 1, 2026
13 checks passed
@CasLubbers
CasLubbers deleted the APL-2194 branch October 1, 2026 14:33
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.

4 participants