-
Notifications
You must be signed in to change notification settings - Fork 2
Pin panel versions, report runtime status, fix log preconditions #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
adbb428
feat(easypanel): pin supported panel versions and centralize routes
igun997 5271b37
feat(paas)!: runtime service status, log preconditions, redacted env
igun997 0bb21c8
docs: v0.1.0 notes and updated instructions
igun997 63ddb42
fix: address review findings on the version window and log cache
igun997 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project are documented here. Versions follow the | ||
| `vMAJOR.MINOR.PATCH` git tags that drive the release pipeline. | ||
|
|
||
| ## v0.1.0 | ||
|
|
||
| Supported Easypanel versions: **2.32.0 .. 2.33.1**, both bounds backed by pinned | ||
| route surfaces in `internal/easypanel/testdata/`. | ||
|
|
||
| ### Breaking | ||
|
|
||
| - `GetServiceStatus` no longer returns environment variable values by default. | ||
| Keys are kept and values become `<redacted>`. Set `include_env: true` on the | ||
| request to get clear text. Easypanel stores secrets in the same env blob its | ||
| inspect routes return, and a `GRPC_AUTH_TOKENS` entry can read every project. | ||
|
|
||
| ### Features | ||
|
|
||
| - `GetServiceStatus` now reports runtime state alongside stored configuration: | ||
| `status` (`running` / `stopped` / `unknown`), `running_containers`, | ||
| `containers[]` (id, name, image, state, status, created) and, for compose | ||
| services, `compose_services[]`. Compose services fall back to the running | ||
| container's image, which the panel's inspect route never provides. | ||
| - `GetLogs` gained the panel's remaining Loki filters: `stream`, `levels`, | ||
| `search`, `start` and `end`. `limit` is clamped to the panel's maximum of 1000 | ||
| instead of being rejected as a validation error. | ||
| - Panel version support window is now explicit (`MinSupportedVersion`, | ||
| `MaxTestedVersion`). The gRPC server probes the live panel at startup and logs | ||
| whether it is inside that window. Skip with `EASYPANEL_SKIP_VERSION_CHECK=1`. | ||
| - New CLI commands: `settings panel-version` (panel version + supported range) | ||
| and `settings logs` (log aggregation status). | ||
| - `scripts/panel-surface.sh` + `scripts/extract-panel-surface.py` re-pin the panel | ||
| route surface from the official `easypanel/easypanel` images. | ||
|
|
||
| ### Fixes | ||
|
|
||
| - `GetLogs` no longer surfaces the panel's opaque `[BAD_REQUEST] fetch failed`. | ||
| Easypanel serves logs only from its own Loki deployment, which exists only when | ||
| log aggregation is enabled (Settings -> Logs, licensed feature). The RPC now | ||
| prechecks `logs.getSettings` and returns `FailedPrecondition` naming the cause | ||
| and the fix; an unreachable-but-enabled log store is reported separately. | ||
| - Invalid `stream` values are rejected locally with `InvalidArgument` rather than | ||
| producing a panel validation error. | ||
| - A failed container query no longer fails the whole `GetServiceStatus` call; it | ||
| degrades to `status: "unknown"` with configuration intact. | ||
|
|
||
| ### Internal | ||
|
|
||
| - Every panel route is declared in `internal/easypanel/routes.go` instead of being | ||
| spread across string literals. | ||
| - Pinned panel route surfaces for 2.32.0, 2.32.2, 2.33.0 and 2.33.1 with tests | ||
| asserting every route used still exists, that its input shape is unchanged across | ||
| the supported range, and that the declared window matches the pinned files. | ||
| - New unit tests cover log filter forwarding, limit clamping, precondition | ||
| mapping, runtime status assembly, env redaction, version parsing and the panel | ||
| version probe. New live test `TestGRPC_RuntimeStatusAndLogs`. | ||
| - Enabling log aggregation now takes effect on the next `GetLogs` call: the | ||
| disabled precheck invalidates the cached settings instead of waiting out the TTL. | ||
| - `EASYPANEL_SKIP_VERSION_CHECK` is parsed as a boolean, so `=0` no longer skips | ||
| the probe. | ||
|
|
||
| ## v0.0.2 | ||
|
|
||
| - Apply Easypanel config changes via redeploy. | ||
| - Full resource limits (CPU/memory reservation) plus `UpdateDeploy` RPC. | ||
| - Docker images and release pipeline with `dev` / release tagging. | ||
| - Deployment guide. | ||
|
|
||
| ## v0.0.1 | ||
|
|
||
| - Initial release: Easypanel tRPC CLI and gRPC PaaS adapter with bearer token | ||
| auth, container and compose deployments, domain management. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package main | ||
|
|
||
| import "testing" | ||
|
|
||
| func TestEnvBool(t *testing.T) { | ||
| cases := map[string]bool{ | ||
| "": false, | ||
| "0": false, | ||
| "false": false, | ||
| "no": false, // not a Go bool literal, so it stays off | ||
| "1": true, | ||
| "true": true, | ||
| "TRUE": true, | ||
| "t": true, | ||
| } | ||
| for value, want := range cases { | ||
| t.Setenv("EASYPANEL_SKIP_VERSION_CHECK", value) | ||
| if got := envBool("EASYPANEL_SKIP_VERSION_CHECK"); got != want { | ||
| t.Errorf("envBool(%q) = %v, want %v", value, got, want) | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Only skip the version probe when the value is
1.EASYPANEL_SKIP_VERSION_CHECK=0currently skips the probe. This conflicts with the documented=1contract and can hide an unsupported panel version.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents