Skip to content

fix(ci): empty tag inputs no longer override values.yaml image settings#76

Closed
CodeByNikolas wants to merge 13 commits intomainfrom
fix/empty-tag-no-override
Closed

fix(ci): empty tag inputs no longer override values.yaml image settings#76
CodeByNikolas wants to merge 13 commits intomainfrom
fix/empty-tag-no-override

Conversation

@CodeByNikolas
Copy link
Copy Markdown
Contributor

@CodeByNikolas CodeByNikolas commented Mar 17, 2026

Summary

  • Empty tag inputs in CI workflows no longer override image settings defined in values.yaml
  • Image tag overrides are now conditional — they are only applied when the provided tag input is non-empty
  • Prevents accidental clearing of image references when CI runs without explicit tag parameters

Context

This fix was validated and merged into the feature branch via PR #75. This PR proposes the same change to main for human approval.

Commit

  • 57c6981 fix(ci): empty tag inputs no longer override values.yaml image settings

Summary by CodeRabbit

Release Notes

  • New Features

    • Added sidecar support for application definitions, enabling flexible language server deployments
    • Introduced conversion webhook functionality for enhanced cluster operations
  • Chores

    • Updated container image repositories for improved resource management
    • Enhanced deployment configurations across test and production environments
    • Updated API version compatibility for application definitions

Aligns with EduIDE-Helm PR #11 which adds v1beta11 support.
With helm_chart_tag=pr-11, CI will now resolve
theia-cloud-crds:1.2.0-next.1.pr-11 from GHCR.
Points theia-cloud-crds at the eduide-fork conversion-webhook image
(conversion-webhook:pr-70) which includes the v1beta11 AppDefinition
mapper required for the sidecar redesign.
theia-no-ls:pr-46 and langserver-java:pr-46 no longer exist in the
registry. The no-ls AppDefinitions reference images from ls1intum/theia
directly, so these preloading entries served no purpose.
- preserve explicit mountWorkspace=false in Helm template (avoid default overriding false)
- support sidecar imageTag/defaultImageTag fallback when sidecar image has no explicit tag
- set landing default app to a defined sidecar app and remove stale additionalApps entries
- remove hardcoded latest tags in sidecar appdefs to honor defaultImageTag overrides
- preload no-ls IDE + sidecar langserver images used by test3
- replace ls1intum/theia image references with ghcr.io/eduide/eduide for no-ls IDE and sidecar images
- align test3 appdefinitions and preloading with PR-tagged image pipeline
- add explicit workflow overrides for preloading image indices 7..10
- ensure java-17-no-ls/rust-no-ls and langserver-java/langserver-rust track IDE tag input
- Change theia_cloud_tag and ide_images_tag defaults from 'latest' to ''
- Update input descriptions to clarify empty means no override
- deploy-pr.yml: forward empty tags as-is (remove || 'latest' fallback)
- deploy-theia.yml: apply --set image overrides only when tag is non-empty,
  otherwise leave values.yaml settings untouched; add set -euo pipefail
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

The PR modifies GitHub Actions workflows to allow optional image tag inputs (empty defaults instead of 'latest'), implements conditional Helm command building based on provided tags, bumps CRDs version from 1.2.0-next.0 to 1.2.0-next.1, updates AppDefinition API from v1beta10 to v1beta11 with sidecars support, and configures deployment environments with conversion webhook images and updated test app definitions using sidecar-based language servers.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/deploy-pr.yml, .github/workflows/deploy-theia.yml
Updated workflow inputs to allow empty tag values (removed 'latest' defaults); replaced hard-coded Helm commands with dynamic HELM_CMD array; added conditional logic to apply image overrides only when tags are non-empty; added strict error handling with set -euo pipefail; bumped THEIA_CLOUD_CRDS_VERSION to 1.2.0-next.1.
Helm Chart - AppDefinitions
charts/theia-appdefinitions/templates/appdefinition.yaml
Updated apiVersion and lookup from v1beta10 to v1beta11; introduced new sidecars section with support for image, port, languages, and resource limits; improved defaults for mountWorkspace (now true by default) and image tag resolution.
Helm Values Configuration
charts/theia-cloud-combined/values.yaml
Changed theia-workspace-garbage-collector image repository from ghcr.io/eduide/eduide/garbage-collector to ghcr.io/eduide/garbage-collector.
Deployment Configurations - CRDs
deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml, deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml, deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml, deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml, deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml
Added conversion.image configuration for conversion webhook across all deployment environments, set to ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70.
Test Environment Configuration
deployments/test3.theia-test.artemis.cit.tum.de/values.yaml
Changed storage class from csi-rbd-sc to longhorn; replaced preloaded images and app definitions to use sidecar-based language servers (java-17-no-ls with langserver-java and rust-no-ls with langserver-rust); updated info text and landing page configuration; restructured additionalApps mapping.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Add support for customizable image tags in Theia deployment workflows #22: Introduced theia_cloud_tag and ide_images_tag workflow inputs with 'latest' defaults; this PR removes those defaults and implements conditional handling in Helm commands.
  • Feat/scaling api #66: Modified charts/theia-appdefinitions/templates/appdefinition.yaml for AppDefinition API version and spec preservation logic; overlaps with v1beta11 migration and sidecar additions in this PR.
  • Fix registry references #71: Related workflow input and image tag variable handling changes across deploy-pr.yml and deploy-theia.yml for flexible tag configuration.

Suggested labels

ready to merge

Suggested reviewers

  • Mtze
  • lukaskratzel
  • KevinGruber2001

Poem

🐰 Empty tags now flow with grace,
Sidecars hop in their own space,
Webhooks whisper, helm commands dance,
v1beta11 leads the advance!
A hopping change, so clean and true! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: preventing empty tag inputs from overriding values.yaml image settings through conditional logic in CI workflows.
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
  • Commit unit tests in branch fix/empty-tag-no-override
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR primarily adjusts the GitHub Actions deployment workflows so that empty tag inputs no longer force Helm --set image overrides, allowing the image settings in each environment’s values.yaml to remain authoritative unless an explicit tag is provided.

Changes:

  • Update deploy-pr.yml and deploy-theia.yml inputs/defaults so empty tags don’t fall back to latest, and only apply Helm image overrides when tag inputs are non-empty.
  • Refactor the Helm install step in deploy-theia.yml to build a base helm upgrade --install command and conditionally append overrides.
  • Include additional chart + environment configuration changes (AppDefinition apiVersion/sidecars rendering, CRD conversion webhook image, test3 values updates, garbage-collector image repository change).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
.github/workflows/deploy-theia.yml Makes image overrides conditional on non-empty inputs; refactors Helm invocation; bumps CRDs chart version.
.github/workflows/deploy-pr.yml Removes `
charts/theia-appdefinitions/templates/appdefinition.yaml Switches AppDefinition apiVersion to v1beta11 and adds spec.sidecars rendering.
charts/theia-cloud-combined/values.yaml Changes garbage-collector image repository value.
deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml Pins CRD conversion webhook image to :pr-70.
deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml Pins CRD conversion webhook image to :pr-70.
deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml Pins CRD conversion webhook image to :pr-70.
deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml Pins CRD conversion webhook image to :pr-70.
deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml Pins CRD conversion webhook image to :pr-70 (also removes the header comment).
deployments/test3.theia-test.artemis.cit.tum.de/values.yaml Updates test3 environment to sidecar-based appdefinitions + related image/app changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +263 to +266
--set "theia-cloud.preloading.images[7]=ghcr.io/eduide/eduide/java-17-no-ls:${IDE_IMAGES_TAG}"
--set "theia-cloud.preloading.images[8]=ghcr.io/eduide/eduide/rust-no-ls:${IDE_IMAGES_TAG}"
--set "theia-cloud.preloading.images[9]=ghcr.io/eduide/eduide/langserver-java:${IDE_IMAGES_TAG}"
--set "theia-cloud.preloading.images[10]=ghcr.io/eduide/eduide/langserver-rust:${IDE_IMAGES_TAG}"
Comment on lines 164 to 166
THEIA_CLOUD_BASE_VERSION="1.4.0-next.0"
THEIA_CLOUD_CRDS_VERSION="1.2.0-next.0"
THEIA_CLOUD_CRDS_VERSION="1.2.0-next.1"

clusterIssuer: theia-cloud-selfsigned-issuer

conversion:
image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70
clusterIssuer: theia-cloud-selfsigned-issuer

conversion:
image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70
Comment on lines 132 to +141
theia-appdefinitions:
apps:
- name: java-ls-test
image: ghcr.io/eduide/eduide/theia-no-ls
imageTag: pr-46
options:
langserver-image: ghcr.io/eduide/eduide/langserver-java:pr-46
- name: java-17-no-ls
image: ghcr.io/eduide/eduide/java-17-no-ls
minInstances: 1
sidecars:
- name: langserver
image: ghcr.io/eduide/eduide/langserver-java
port: 5000
languages: [java]
Comment on lines 154 to 157
replicaCount: 1
image:
repository: ghcr.io/eduide/eduide/garbage-collector
repository: ghcr.io/eduide/garbage-collector
tag: latest
Comment on lines 1 to 18
@@ -14,7 +14,7 @@
{{- $maxInstances = get $existingSpec "maxInstances" }}
{{- end }}
---
apiVersion: theia.cloud/v1beta10
apiVersion: theia.cloud/v1beta11
kind: AppDefinition
clusterIssuer: theia-cloud-selfsigned-issuer

conversion:
image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70
clusterIssuer: theia-cloud-selfsigned-issuer

conversion:
image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70
clusterIssuer: theia-cloud-selfsigned-issuer

conversion:
image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70
Copy link
Copy Markdown

@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.

Actionable comments posted: 4

🧹 Nitpick comments (2)
.github/workflows/deploy-pr.yml (1)

50-51: Normalize theia_cloud_tag and ide_images_tag to match helm_chart_tag pattern.

The workflow runs on both pull_request and workflow_dispatch events. For pull_request runs, inputs.* are unset and evaluate to null. This is already handled for helm_chart_tag using || '' but missing for theia_cloud_tag and ide_images_tag. Add the same normalization for consistency.

Suggested diff
-      theia_cloud_tag: ${{ inputs.theia_cloud_tag }}
-      ide_images_tag: ${{ inputs.ide_images_tag }}
+      theia_cloud_tag: ${{ inputs.theia_cloud_tag || '' }}
+      ide_images_tag: ${{ inputs.ide_images_tag || '' }}

Also applies to: 68-69, 86-87

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-pr.yml around lines 50 - 51, Normalize
theia_cloud_tag and ide_images_tag wherever they are set to mirror the existing
helm_chart_tag pattern: replace occurrences that assign theia_cloud_tag: ${{
inputs.theia_cloud_tag }} and ide_images_tag: ${{ inputs.ide_images_tag }} with
the normalized form using a fallback empty string (e.g., theia_cloud_tag: ${{
inputs.theia_cloud_tag || '' }} and ide_images_tag: ${{ inputs.ide_images_tag ||
'' }}), and apply the same change for the other two places mentioned (the second
and third blocks where these variables appear) so all three tags
(helm_chart_tag, theia_cloud_tag, ide_images_tag) consistently use the || ''
normalization.
.github/workflows/deploy-theia.yml (1)

255-268: Consider preserving each environment’s IDE preload list when ide_images_tag is set.

This block still rewrites theia-cloud.preloading.images[1..10] to a shared fixed set. That means tagged deployments stop respecting environment-specific image catalogs; for example, deployments/test3.theia-test.artemis.cit.tum.de/values.yaml now exposes only the sidecar-based apps, but a tagged deploy would still force the legacy preload entries back in.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-theia.yml around lines 255 - 268, The current
workflow branch unconditionally overwrites theia-cloud.preloading.images[1..10]
when IDE_IMAGES_TAG is set, which discards environment-specific preload lists;
instead remove the hardcoded --set "theia-cloud.preloading.images[...]" entries
from the HELM_CMD block and only set
theia-appdefinitions.defaultImageTag="${IDE_IMAGES_TAG}" (i.e., keep the
IDE_IMAGES_TAG handling but do not touch theia-cloud.preloading.images in the
IDE_IMAGES_TAG branch), so that existing environment values files continue to
provide their own preloading lists while tagged deploys only inject the shared
tag via theia-appdefinitions.defaultImageTag.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deploy-theia.yml:
- Around line 245-250: The current helm overrides replace the full image
repository/name instead of just the tag; update the HELM_CMD entries that set
theia-cloud.landingPage.image, theia-cloud.operator.image,
theia-cloud.service.image and theia-cloud.preloading.images[0] so they only
override the image tag (e.g. use
theia-cloud.landingPage.image.tag="${THEIA_CLOUD_TAG}",
theia-cloud.operator.image.tag="${THEIA_CLOUD_TAG}",
theia-cloud.service.image.tag="${THEIA_CLOUD_TAG}" and
theia-cloud.preloading.images[0].tag="${THEIA_CLOUD_TAG}" or the equivalent
tag-only keys used by the chart) to preserve the repository/name from
charts/theia-cloud-combined/values.yaml while changing only the tag.

In `@charts/theia-appdefinitions/templates/appdefinition.yaml`:
- Around line 61-66: The template should explicitly validate that each sidecar
image string is present before calling contains/regexMatch: change the
assignment of $sidecarImage to use the required function (e.g., set
$sidecarImage := required "missing sidecar image for sidecar <name or index>"
.image) so a clear failure occurs if .image is absent; keep the existing image
tag logic that checks contains "@sha256:" and regexMatch and still appends
.imageTag | default $.Values.defaultImageTag | default "latest" when
appropriate. Ensure the required message is descriptive (mention sidecar name or
index) and reference $sidecarImage, .image, and .imageTag in the fix.

In `@deployments/test3.theia-test.artemis.cit.tum.de/values.yaml`:
- Around line 102-103: Update the landing-page copy by removing the internal PR
reference from the infoText value: edit the infoText string that currently
contains "PR `#70`" so it reads without the PR mention (e.g., "Test environment
for Theia with external language server architecture. The IDE runs separately
from the language server for improved performance and modularity."), leaving
infoTitle unchanged.

In `@deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml`:
- Around line 4-5: The manifest uses a PR-scoped image tag in the
conversion.image field (ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70);
replace this ephemeral tag with an immutable release tag or digest (e.g., a
semantically versioned tag or sha256 digest) so deployments are reproducible and
stable across environments, update any other occurrences of :pr-* in your helm
values to the chosen release tag/digest, and ensure the CI/CD pipeline and
imagePullSecrets (if any) are updated accordingly.

---

Nitpick comments:
In @.github/workflows/deploy-pr.yml:
- Around line 50-51: Normalize theia_cloud_tag and ide_images_tag wherever they
are set to mirror the existing helm_chart_tag pattern: replace occurrences that
assign theia_cloud_tag: ${{ inputs.theia_cloud_tag }} and ide_images_tag: ${{
inputs.ide_images_tag }} with the normalized form using a fallback empty string
(e.g., theia_cloud_tag: ${{ inputs.theia_cloud_tag || '' }} and ide_images_tag:
${{ inputs.ide_images_tag || '' }}), and apply the same change for the other two
places mentioned (the second and third blocks where these variables appear) so
all three tags (helm_chart_tag, theia_cloud_tag, ide_images_tag) consistently
use the || '' normalization.

In @.github/workflows/deploy-theia.yml:
- Around line 255-268: The current workflow branch unconditionally overwrites
theia-cloud.preloading.images[1..10] when IDE_IMAGES_TAG is set, which discards
environment-specific preload lists; instead remove the hardcoded --set
"theia-cloud.preloading.images[...]" entries from the HELM_CMD block and only
set theia-appdefinitions.defaultImageTag="${IDE_IMAGES_TAG}" (i.e., keep the
IDE_IMAGES_TAG handling but do not touch theia-cloud.preloading.images in the
IDE_IMAGES_TAG branch), so that existing environment values files continue to
provide their own preloading lists while tagged deploys only inject the shared
tag via theia-appdefinitions.defaultImageTag.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8718c52d-0a30-4b00-b864-8882ed879787

📥 Commits

Reviewing files that changed from the base of the PR and between 34d6830 and 57c6981.

📒 Files selected for processing (10)
  • .github/workflows/deploy-pr.yml
  • .github/workflows/deploy-theia.yml
  • charts/theia-appdefinitions/templates/appdefinition.yaml
  • charts/theia-cloud-combined/values.yaml
  • deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml
  • deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml
  • deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml
  • deployments/test3.theia-test.artemis.cit.tum.de/values.yaml
  • deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml
  • deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml

Comment on lines +245 to +250
if [ -n "${THEIA_CLOUD_TAG}" ]; then
HELM_CMD+=(
--set theia-cloud.landingPage.image="ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}"
--set theia-cloud.operator.image="ghcr.io/eduide/eduide-cloud/operator:${THEIA_CLOUD_TAG}"
--set theia-cloud.service.image="ghcr.io/eduide/eduide-cloud/service:${THEIA_CLOUD_TAG}"
--set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Keep theia_cloud_tag as a tag-only override.

This block switches the repository from ghcr.io/eduide/eduide/... to ghcr.io/eduide/eduide-cloud/... instead of only changing the tag. Any deployment that passes theia_cloud_tag will therefore stop matching the images configured in charts/theia-cloud-combined/values.yaml.

Proposed fix
           if [ -n "${THEIA_CLOUD_TAG}" ]; then
             HELM_CMD+=(
-              --set theia-cloud.landingPage.image="ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}"
-              --set theia-cloud.operator.image="ghcr.io/eduide/eduide-cloud/operator:${THEIA_CLOUD_TAG}"
-              --set theia-cloud.service.image="ghcr.io/eduide/eduide-cloud/service:${THEIA_CLOUD_TAG}"
-              --set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}"
+              --set theia-cloud.landingPage.image="ghcr.io/eduide/eduide/landing-page:${THEIA_CLOUD_TAG}"
+              --set theia-cloud.operator.image="ghcr.io/eduide/eduide/operator:${THEIA_CLOUD_TAG}"
+              --set theia-cloud.service.image="ghcr.io/eduide/eduide/service:${THEIA_CLOUD_TAG}"
+              --set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide/landing-page:${THEIA_CLOUD_TAG}"
             )
           fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [ -n "${THEIA_CLOUD_TAG}" ]; then
HELM_CMD+=(
--set theia-cloud.landingPage.image="ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}"
--set theia-cloud.operator.image="ghcr.io/eduide/eduide-cloud/operator:${THEIA_CLOUD_TAG}"
--set theia-cloud.service.image="ghcr.io/eduide/eduide-cloud/service:${THEIA_CLOUD_TAG}"
--set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}"
if [ -n "${THEIA_CLOUD_TAG}" ]; then
HELM_CMD+=(
--set theia-cloud.landingPage.image="ghcr.io/eduide/eduide/landing-page:${THEIA_CLOUD_TAG}"
--set theia-cloud.operator.image="ghcr.io/eduide/eduide/operator:${THEIA_CLOUD_TAG}"
--set theia-cloud.service.image="ghcr.io/eduide/eduide/service:${THEIA_CLOUD_TAG}"
--set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide/landing-page:${THEIA_CLOUD_TAG}"
)
fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-theia.yml around lines 245 - 250, The current helm
overrides replace the full image repository/name instead of just the tag; update
the HELM_CMD entries that set theia-cloud.landingPage.image,
theia-cloud.operator.image, theia-cloud.service.image and
theia-cloud.preloading.images[0] so they only override the image tag (e.g. use
theia-cloud.landingPage.image.tag="${THEIA_CLOUD_TAG}",
theia-cloud.operator.image.tag="${THEIA_CLOUD_TAG}",
theia-cloud.service.image.tag="${THEIA_CLOUD_TAG}" and
theia-cloud.preloading.images[0].tag="${THEIA_CLOUD_TAG}" or the equivalent
tag-only keys used by the chart) to preserve the repository/name from
charts/theia-cloud-combined/values.yaml while changing only the tag.

Comment on lines +61 to +66
{{- $sidecarImage := .image }}
{{- if or (contains "@sha256:" $sidecarImage) (regexMatch ".*:[^/]+$" $sidecarImage) }}
image: {{ $sidecarImage }}
{{- else }}
image: {{ $sidecarImage }}:{{ .imageTag | default $.Values.defaultImageTag | default "latest" }}
{{- end }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check current values for sidecar blocks that might miss "image".
# Expected: no sidecar entries without image.
rg -n -A8 -B2 'sidecars:' charts deployments

Repository: EduIDE/EduIDE-deployment

Length of output: 2961


🏁 Script executed:

#!/bin/bash
# Find all sidecar entries across all deployment values files
# Check if any sidecar is missing the image field
find deployments -name "values.yaml" -o -name "*.yaml" | xargs rg -A10 "^\s+- name:" | rg -B10 "sidecars:" | grep -E "(sidecars:|name:|image:)" | head -100

Repository: EduIDE/EduIDE-deployment

Length of output: 805


🏁 Script executed:

#!/bin/bash
# More direct: find all sidecar entries and check for missing image field
rg -n -A15 "sidecars:" deployments --type yaml | grep -E "(sidecars:|name:|image:|port:|languages:)" | head -150

Repository: EduIDE/EduIDE-deployment

Length of output: 1198


🌐 Web query:

Helm template contains function nil value behavior

💡 Result:

In Helm templates (Go text/template + Sprig), nil/null and “missing values” mainly matter in two places: field access and “emptiness” checks.

  • Accessing nested fields on a missing map/object can hard-fail with errors like nil pointer evaluating interface {} (e.g., .Values.foo.bar when foo isn’t set). This happens before functions like default can run if the evaluation of .Values.foo.bar itself panics. A common workaround is to avoid direct dot-chains and use safer access patterns (index, hasKey, etc.). [1], [2], [3]

  • default uses “empty” semantics, not “is nil” semantics. In Helm, default X Y returns X when Y is considered “empty”. “Empty” includes nil, "", 0, false, and empty lists/maps—so default true .Values.flag will override an explicitly-set false. [4], [5]

  • required fails on empty values using the same emptiness rules (so it fails for nil, "", etc.). [4]

Practical patterns

  • Prefer index/hasKey when a parent key may not exist (avoids nil-pointer evaluation). [3]
  • Use default only when you truly want “empty/false/0” to be treated as “unset”; otherwise handle booleans and zeros explicitly. [5]
  • If you expected default to protect you from missing intermediate objects, it won’t in cases where the intermediate lookup panics (this is a known/recurring issue pattern). [2]

Sources: Helm function docs and guides on default/empty/required, plus community reports on nil-pointer evaluation and default not preventing it in missing-parent scenarios. [1], [2], [4], [5]

[1] https://helm.sh/docs/v3/chart_template_guide/functions_and_pipelines/
[2] helm/helm#8026
[3] https://stackoverflow.com/questions/59571842/helm-charts-how-do-i-use-default-on-undefined-object-property-values
[4] https://blog.helm.sh/docs/chart_template_guide/function_list/
[5] https://stackoverflow.com/questions/74257084/how-to-pass-false-value-to-helm-default


🌐 Web query:

Helm regexMatch function nil value error handling

💡 Result:

In Helm, regexMatch (Sprig) expects its second argument to be a string; if the value is nil (or a non-string type), template rendering fails (often as invalid value; expected string). Also, regexMatch can panic on problems, while mustRegexMatch reports an error back to the template engine. [1]

Safe patterns

1) Default nil to an empty string (most common)

{{- $s := default "" .Values.someValue -}}
{{- if regexMatch "^foo" $s -}}
...
{{- end -}}

This ensures regexMatch always receives a string.

2) Guard the call (short-circuit)

{{- if and .Values.someValue (regexMatch "^foo" .Values.someValue) -}}
...
{{- end -}}

Only runs regexMatch when the value is non-empty/non-nil.

3) If the value is nested and parent maps may be missing, don’t dot-walk directly
Dot-walking like .Values.a.b.c can error before default runs if a/b is missing; instead, default intermediate maps first: [2]

{{- $a := default dict .Values.a -}}
{{- $b := default dict $a.b -}}
{{- $s := default "" $b.c -}}
{{- if regexMatch "^foo" $s -}} ... {{- end -}}

4) Use hasKey before accessing missing parents (alternative)

{{- if hasKey .Values "a" -}}
  {{- /* then safely read .Values.a ... */ -}}
{{- end -}}

This avoids nil-pointer-style failures when parent keys don’t exist. [3]

Sources: Sprig string/regex function docs [1]; Helm templating nil/default handling examples on missing nested keys [2], [3].


Add explicit validation for required sidecar image.

The contains and regexMatch functions expect string values and will fail with unclear errors if sidecars[].image is missing. Use required to catch missing images early with a clear failure message.

Suggested diff
-      {{- $sidecarImage := .image }}
+      {{- $sidecarImage := required "sidecars[].image is required" .image }}
       {{- if or (contains "@sha256:" $sidecarImage) (regexMatch ".*:[^/]+$" $sidecarImage) }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/theia-appdefinitions/templates/appdefinition.yaml` around lines 61 -
66, The template should explicitly validate that each sidecar image string is
present before calling contains/regexMatch: change the assignment of
$sidecarImage to use the required function (e.g., set $sidecarImage := required
"missing sidecar image for sidecar <name or index>" .image) so a clear failure
occurs if .image is absent; keep the existing image tag logic that checks
contains "@sha256:" and regexMatch and still appends .imageTag | default
$.Values.defaultImageTag | default "latest" when appropriate. Ensure the
required message is descriptive (mention sidecar name or index) and reference
$sidecarImage, .image, and .imageTag in the fix.

Comment on lines 102 to +103
infoTitle: "🚀 Welcome to Test3 IDE Environment"
infoText: "This is a testing environment for Theia Cloud. Select your programming language and start coding in seconds!"
infoText: "Test environment for Theia with external language server architecture (PR #70). The IDE runs separately from the language server for improved performance and modularity."
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Drop the internal PR reference from the landing-page copy.

PR #70`` is user-visible here, but it is internal context and will go stale quickly.

Suggested wording
-    infoText: "Test environment for Theia with external language server architecture (PR `#70`). The IDE runs separately from the language server for improved performance and modularity."
+    infoText: "Test environment for Theia with external language server architecture. The IDE runs separately from the language server for improved performance and modularity."
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
infoTitle: "🚀 Welcome to Test3 IDE Environment"
infoText: "This is a testing environment for Theia Cloud. Select your programming language and start coding in seconds!"
infoText: "Test environment for Theia with external language server architecture (PR #70). The IDE runs separately from the language server for improved performance and modularity."
infoTitle: "🚀 Welcome to Test3 IDE Environment"
infoText: "Test environment for Theia with external language server architecture. The IDE runs separately from the language server for improved performance and modularity."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deployments/test3.theia-test.artemis.cit.tum.de/values.yaml` around lines 102
- 103, Update the landing-page copy by removing the internal PR reference from
the infoText value: edit the infoText string that currently contains "PR `#70`" so
it reads without the PR mention (e.g., "Test environment for Theia with external
language server architecture. The IDE runs separately from the language server
for improved performance and modularity."), leaving infoTitle unchanged.

Comment on lines +4 to +5
conversion:
image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify where PR-scoped conversion webhook tags are committed.
# Expected for long-lived envs: no pr-* tags.
rg -nP 'conversion-webhook:pr-\d+' deployments

Repository: EduIDE/EduIDE-deployment

Length of output: 748


Avoid PR-scoped image tags in deployment manifests.

Using :pr-70 makes deployments dependent on a potentially ephemeral CI artifact. This tag pattern appears across multiple environments (production, staging, test). Replace with an immutable release tag or digest for reproducibility and stability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml` around lines
4 - 5, The manifest uses a PR-scoped image tag in the conversion.image field
(ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70); replace this ephemeral
tag with an immutable release tag or digest (e.g., a semantically versioned tag
or sha256 digest) so deployments are reproducible and stable across
environments, update any other occurrences of :pr-* in your helm values to the
chosen release tag/digest, and ensure the CI/CD pipeline and imagePullSecrets
(if any) are updated accordingly.

@CodeByNikolas
Copy link
Copy Markdown
Contributor Author

Closing this PR because the fix/empty-tag-no-override branch carries 13 unrelated commits from feature branch ancestry, making it unsuitable for merging into main. The intended fix (commit 57c6981) has been cherry-picked onto a clean branch based directly on main and is now tracked in PR #77.

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