feat(HDNEXT-1608): migrate app-list config to ncw-config's .list format - #148
Open
Arsalanulhaq wants to merge 7 commits into
Open
feat(HDNEXT-1608): migrate app-list config to ncw-config's .list format#148Arsalanulhaq wants to merge 7 commits into
Arsalanulhaq wants to merge 7 commits into
Conversation
Arsalanulhaq
force-pushed
the
as/dev/HDNEXT-1608-ncw-config-migration
branch
from
August 10, 2026 12:26
f081dd2 to
e0446c9
Compare
Arsalanulhaq
force-pushed
the
as/dev/HDNEXT-1608-ncw-config-migration
branch
from
August 10, 2026 14:42
0c7ed4a to
2cd9660
Compare
There was a problem hiding this comment.
Pull request overview
Migrates app enable/disable configuration from sourced shell include files to a line-based .list format (aligned with ncw-config), and updates the supporting scripts to read these lists via a helper function. It also extends apps-disable.sh to support an optional “always enabled” list and documents the new list format.
Changes:
- Replace
enabled-core-apps.inc.sh/disabled-apps.inc.shusage with.listfiles andread_app_list()in relevant scripts. - Add
always-enabled-apps.listsupport and enhanceapps-disable.sh’s shipped.json patching behavior. - Document and enforce
.listhandling via.list-format-spec.mdand.gitattributes.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| enabled-core-apps.list | Converted core-enabled app configuration to line-based list format. |
| disabled-apps.list | Converted disabled app configuration to line-based list format. |
| configure.sh | Loads disabled apps via .list + adds env validation and secret-safe OCC helper. |
| configure-user-oidc.sh | Adds env validation helper and improves error handling for required vars. |
| configure-object-store.sh | Adds env validation helper to reduce repeated checks. |
| apps-enable.sh | Reads enabled/disabled app lists from .list files via helper. |
| apps-disable.sh | Reads disabled/always-enabled lists and patches core/shipped.json accordingly. |
| always-enabled-apps.list | Introduces (currently empty) list for non-disableable apps. |
| .list-format-spec.md | Adds documentation for the .list format and how scripts process it. |
| .gitattributes | Ensures consistent LF handling and linguist language for .list files. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
102
to
105
| main() { | ||
| if ! which jq 2>&1 >/dev/null; then | ||
| log_fatal "jq is required" | ||
| fi |
Comment on lines
+12
to
+16
| # Format: | ||
| # - One app name per line | ||
| # - Lines starting with # are comments | ||
| # - Empty lines are ignored | ||
| # - Whitespace is trimmed |
Comment on lines
+53
to
+63
| Scripts process these files using standard shell commands: | ||
| ```bash | ||
| # Example: Read and filter | ||
| grep -v '^#' file.list | grep -v '^[[:space:]]*$' | ||
| ``` | ||
|
|
||
| This approach: | ||
| 1. Removes comment lines (`^#`) | ||
| 2. Removes empty lines (`^[[:space:]]*$`) | ||
| 3. Preserves item names exactly as written | ||
|
|
Replace disabled-apps.inc.sh / enabled-core-apps.inc.sh shell arrays with plain line-based disabled-apps.list / enabled-core-apps.list, matching the ncw-config approach. configure.sh, apps-enable.sh and apps-disable.sh now read these via a read_app_list() helper instead of sourcing shell files. Also add always-enabled-apps.list support in apps-disable.sh (ports the alwaysEnabled enforcement in shipped.json from ncw-config), plus .list-format-spec.md and .gitattributes documenting/handling the new format. always-enabled-apps.list is left empty for now - deciding which HiDrive Next apps should become non-disableable is a separate product decision.
disable_configured_apps() uses jq via 'occ app:list --output json | jq', but check_dependencies() only checked for php. Port ncw-config's jq check so a missing jq fails fast with a clear error instead of a confusing mid-script failure.
…bearing OCC calls Port ncw-config's execute_occ_secret_command, which omits command arguments from error logs, plus a safety net in execute_occ_command that delegates to it when --secret/--sensitive is detected in the arguments. Switch the two secret-bearing calls (nc_ionos_processes basic_auth_pass, serverinfo token) to use it, so a failed OCC call never logs the raw credential/token value.
… checks Port ncw-config's validate_env_vars, which warns per-missing-variable and returns non-zero if any are unset. Replace the ad-hoc -z/OR chains in configure_ionos_processes_app (3 vars) and configure_app_richdocuments (2 vars) with it - same behavior, less repetition, and callers now get a warning naming exactly which variable is missing instead of a generic "X, Y or Z not set" message.
Replace the 6 sequential -z/log_fatal checks for ENC_OBJECT_STORAGE_* vars with a single validate_env_vars call (ported from ncw-config, same helper added to configure.sh). Now reports every missing variable at once instead of stopping at the first one.
Three code paths (missing logout URIs for a non-DEV instance, missing INSTANCE_TYPE, missing MARKET) called fail(), which is never defined in this script - it would have errored with "fail: command not found" instead of the intended fatal error message. Use the already-defined log_fatal instead.
Replace the 9 sequential -z/log_fatal checks (7 ENC_OIDC_* vars plus INSTANCE_TYPE and MARKET) with a single validate_env_vars call, matching the same helper already added to configure.sh and configure-object-store.sh. Reports every missing variable at once instead of stopping at the first one.
printminion-co
force-pushed
the
as/dev/HDNEXT-1608-ncw-config-migration
branch
from
August 14, 2026 07:00
2cd9660 to
f474454
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace disabled-apps.inc.sh / enabled-core-apps.inc.sh shell arrays with plain line-based disabled-apps.list / enabled-core-apps.list, matching the ncw-config approach. configure.sh, apps-enable.sh and apps-disable.sh now read these via a read_app_list() helper instead of sourcing shell files.
Also add always-enabled-apps.list support in apps-disable.sh (ports the alwaysEnabled enforcement in shipped.json from ncw-config), plus .list-format-spec.md and .gitattributes documenting/handling the new format.
always-enabled-apps.list is left empty for now - deciding which HiDrive Next apps should become non-disableable is a separate product decision.