Skip to content

fix(examples): compose.pangolin.yml + .env.example — PRINTER_HUB_* prefix, korrekte Pangolin-Labels#113

Merged
strausmann merged 1 commit into
mainfrom
fix/73-stale-compose-pangolin-env-labels
Jun 9, 2026
Merged

fix(examples): compose.pangolin.yml + .env.example — PRINTER_HUB_* prefix, korrekte Pangolin-Labels#113
strausmann merged 1 commit into
mainfrom
fix/73-stale-compose-pangolin-env-labels

Conversation

@strausmann

Copy link
Copy Markdown
Owner

Summary

examples/compose.pangolin.yml und examples/.env.example haben seit Mai 2026 Bit-Rot akkumuliert. Bei einem Produktions-Deploy auf hhdocker02 (2026-05-17) haben beide Dateien durch stille Fehler fehlgeschlagen — keine Fehlermeldung, der Hub startet aber mit falschen Defaults. Dieses PR behebt alle 6 Probleme aus Issue #73.

Contributor License Agreement (CLA)

By opening this pull request you affirm that you have read and agree to the
project's Contributor License Agreement for the contribution(s)
included here.

Linked issue

Closes #73

Type of change

  • Bug fix (non-breaking)
  • Documentation only

Hardware tested on

  • No hardware impact

Test coverage

  • Existing tests still pass
  • No behaviour change (example files only)

Änderungen im Detail

compose.pangolin.yml

Problem Vorher Nachher
Env-Var-Prefix PRINTERS=, WEBHOOK_API_KEY=, … PRINTER_HUB_PRINTERS_CONFIG=, PRINTER_HUB_WEBHOOK_API_KEY=, …
Drucker-Konfiguration PRINTERS=slug:ip (veraltet) printers.yaml-Volume-Mount
Pangolin Label-Prefix pangolin.resources.* (ignoriert) pangolin.public-resources.* (korrekt)
Pangolin Pflichtfelder fehlend ssl, targets[0].method, targets[0].path-match, name
protocol https (falsch) http (SSL termination at Pangolin edge)
Netzwerk pangolin-newt (hardcoded) pangolin_mgmt mit name: pangolin_pangolin_mgmt (Alias-Pattern)
Restart-Kommentar docker restart pangolin-newt neutraler Hinweis auf Container-Management-Tool

.env.example

  • Alle Backend-Variablen auf PRINTER_HUB_*-Prefix aktualisiert
  • Veraltete PRINTERS=slug:ip-Zeile durch Hinweis auf printers.yaml ersetzt
  • SNMP_COMMUNITY, DATABASE_URL, LOG_LEVEL, Integration-Keys korrekt präfixiert

Checklist

  • PR title follows Conventional Commits
  • No private IPs, hostnames, domains, real tokens, or PII in commits
  • CI is green (example files only — no code change)

… aktuelle Konfiguration

Behebt 6 Bitrot-Probleme aus Issue #73:
1. Backend-Env-Variablen auf PRINTER_HUB_*-Prefix umgestellt
2. PRINTERS/SNMP_COMMUNITY durch printers.yaml-Volume ersetzt
3. Pangolin-Labels von pangolin.resources.* auf pangolin.public-resources.* korrigiert
4. Pflichtfelder ssl, targets[0].method, targets[0].path-match, name ergänzt
5. protocol=https → protocol=http korrigiert (SSL termination at Pangolin edge)
6. Netzwerk-Alias-Pattern für pangolin_pangolin_mgmt ergänzt
7. docker-restart-Kommentar durch neutralen Container-Management-Hinweis ersetzt

Closes #73

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 9, 2026 21:41
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Dieses Pull Request behebt Konfigurationsprobleme in den Beispiel-Dateien für die Pangolin-Integration. Durch die Aktualisierung der Umgebungsvariablen-Präfixe, die Umstellung auf eine dateibasierte Drucker-Konfiguration und die Korrektur der Pangolin-Labels wird die Stabilität und Wartbarkeit der Deployment-Beispiele sichergestellt.

Highlights

  • Environment Variable Prefixing: Updated all backend environment variables to use the 'PRINTER_HUB_' prefix for better consistency and to avoid collisions.
  • Pangolin Configuration: Migrated Pangolin labels to the 'public-resources' namespace and added required fields like SSL, target methods, and path matching.
  • Printer Configuration: Replaced the deprecated 'PRINTERS' environment variable with a 'printers.yaml' volume mount approach.
  • Network and Lifecycle: Updated the network reference to 'pangolin_mgmt' and clarified the container restart procedure for blueprint label updates.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors configuration files to prefix environment variables with "PRINTER_HUB_" and migrates printer definitions to a "printers.yaml" file. It also updates Pangolin labels and network configurations in "compose.pangolin.yml". The review feedback identifies two issues: an inconsistency in "compose.pangolin.yml" where a comment mentions "path-prefix" but the labels use "targets[0].path", and the removal of "LOG_LEVEL" from ".env.example" while it is still referenced by the frontend container.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +70 to +72
# Note: Two routes on the same full-domain are only possible with distinct
# path-prefix values. The webhook resource bypasses SSO so that external
# callers can post without a browser session.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Der Kommentar erwähnt, dass zwei Routen auf derselben Domain nur mit unterschiedlichen path-prefix-Werten möglich sind. Im Code wird jedoch kein path-prefix-Label auf Ressourcenebene verwendet, sondern targets[0].path und targets[0].path-match. Bitte prüfen Sie, ob der Kommentar veraltet ist oder ob hier tatsächlich ein Label wie pangolin.public-resources.printerhub-webhooks.path-prefix=/api/webhook/ auf Ressourcenebene fehlt, damit Pangolin die Routen und den SSO-Bypass korrekt trennen kann.

Comment thread examples/.env.example

# ----- Logging --------------------------------------------------------------
LOG_LEVEL=INFO
PRINTER_HUB_LOG_LEVEL=INFO

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

In .env.example wurde LOG_LEVEL durch PRINTER_HUB_LOG_LEVEL ersetzt. In compose.pangolin.yml wird für den Frontend-Container jedoch weiterhin LOG_LEVEL=${LOG_LEVEL:-INFO} verwendet. Da LOG_LEVEL nun nicht mehr in .env.example dokumentiert ist, ist für Benutzer nicht direkt ersichtlich, wie sie das Logging des Frontends konfigurieren können. Es wird empfohlen, einen entsprechenden Kommentar oder die Variable LOG_LEVEL=INFO für das Frontend in .env.example zu behalten.

PRINTER_HUB_LOG_LEVEL=INFO
# LOG_LEVEL=INFO

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.20%. Comparing base (ddcf114) to head (26b79e7).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
+ Coverage   89.18%   89.20%   +0.02%     
==========================================
  Files          91       91              
  Lines        4243     4243              
  Branches      365      365              
==========================================
+ Hits         3784     3785       +1     
  Misses        360      360              
+ Partials       99       98       -1     
Components Coverage Δ
Printer Backends (transport) 86.76% <ø> (ø)
Printer Models (drivers) 88.20% <ø> (ø)
Services 91.17% <ø> (+0.07%) ⬆️
REST API 84.97% <ø> (ø)
Pydantic Schemas 100.00% <ø> (ø)
Integration Plugins 100.00% <ø> (ø)
see 1 file with indirect coverage changes
Flag Coverage Δ
backend 89.20% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba7136d...26b79e7. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@strausmann
strausmann merged commit a16643e into main Jun 9, 2026
14 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the Pangolin deployment examples to match the current backend configuration model (PRINTER_HUB_* env vars + printers.yaml) and the correct Pangolin Blueprint label schema, preventing silent misconfiguration when users copy these templates.

Changes:

  • Updated examples/compose.pangolin.yml to use PRINTER_HUB_* env vars, mount printers.yaml, and switch Pangolin labels to pangolin.public-resources.* with required fields (incl. two-resource webhook route).
  • Updated examples/.env.example to document the printers.yaml-based setup and to use PRINTER_HUB_*-prefixed backend variables.

Reviewed changes

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

File Description
examples/compose.pangolin.yml Fixes Pangolin labels/network aliasing and backend env var wiring for the Pangolin example stack.
examples/.env.example Refreshes example env var names and docs to align with current backend settings and printers.yaml config.

Comment thread examples/.env.example
Comment on lines +36 to 37
# Public hostname of the hub (used in Pangolin blueprint labels).
# Only relevant for reverse-proxy variants — for standalone, leave blank.
Comment thread examples/.env.example
Comment on lines 60 to +61
# ----- Logging --------------------------------------------------------------
LOG_LEVEL=INFO
PRINTER_HUB_LOG_LEVEL=INFO
Comment on lines +70 to +72
# Note: Two routes on the same full-domain are only possible with distinct
# path-prefix values. The webhook resource bypasses SSO so that external
# callers can post without a browser session.
@strausmann
strausmann deleted the fix/73-stale-compose-pangolin-env-labels branch June 9, 2026 21:47
github-actions Bot pushed a commit that referenced this pull request Jun 10, 2026
## <small>0.10.1 (2026-06-10)</small>

* fix(brother-ql): doppelter 'preflight SNMP failed' Prefix vermieden (Issue #105) (#114) ([e459fd7](e459fd7)), closes [#105](#105) [#114](#114) [#105](#105)
* fix(examples): aktualisiere compose.pangolin.yml und .env.example auf aktuelle Konfiguration (#113) ([a16643e](a16643e)), closes [#113](#113) [#73](#73)
* chore(deps): bump the go-minor-and-patch group across 1 directory with 3 updates (#112) ([3939741](3939741)), closes [#112](#112)
* docs: Phase 1k.1 Layout-Engine + TapeGeometry + ContentTypes (Spec + Plan) (#108) ([a5425a5](a5425a5)), closes [#108](#108) [#103](#103) [#108](#108) [#103](#103) [#103](#103) [#103](#103) [#103](#103) [#103](#103) [#103](#103) [#103](#103) [#103](#103) [#103](#103)
* ci(deps): bump codecov/codecov-action in the actions-all group (#111) ([2a9454b](2a9454b)), closes [#111](#111)

[skip ci]
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.

examples/compose.pangolin.yml is stale (wrong env names, wrong Pangolin label prefix)

2 participants