Skip to content

Add deprecate-editions workflow; switch release to client-id#123

Open
bschwedler wants to merge 8 commits into
mainfrom
deprecate-editions
Open

Add deprecate-editions workflow; switch release to client-id#123
bschwedler wants to merge 8 commits into
mainfrom
deprecate-editions

Conversation

@bschwedler

@bschwedler bschwedler commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Adds a scheduled workflow that runs on the 1st of each month and creates a PR to remove product editions older than 18 months (per the Posit supported-versions policy). This stops those editions from being built going forward — it does not remove any already-published images from Docker Hub or GHCR.

Also switches the release workflow from the legacy app-id GitHub App input to client-id, as recommended by actions/create-github-app-token.

Depends on posit-dev/images-shared being merged first.

Replace `license-manager activate-file` with a direct file copy to
`/var/lib/rstudio-connect/license.lic`. The `activate-file` command
hard-rejects non-root callers (exit code 44), breaking pods configured
with `runAsNonRoot: true`. Connect reads `*.lic` files from its data
directory natively, so no license-manager invocation is needed.

Also move `trap deactivate EXIT` inside the key and server license
branches — file-based licenses have nothing to deactivate on shutdown.

Mirrors the fix applied to rstudio-docker-products in June 2025
(commit d0eea7b).
If PCT_LICENSE_FILE_PATH points to a file already inside
/var/lib/rstudio-connect/, the previous rm -f would delete it before
cp could read it. Copy to a mktemp file first, then rm and mv, so the
source is safely read regardless of its location.
If PCT_LICENSE_FILE_PATH already points to the destination
(/var/lib/rstudio-connect/license.lic), skip the copy entirely.
This avoids a redundant write when the license is pre-placed via
a subPath volume mount directly into the data directory.

Also removes the rm -f /var/lib/rstudio-connect/*.lic glob that
preceded the copy. Writing to a mounted volume is unavoidable when
the source is outside the data directory, but blanket-removing all
*.lic files is destructive to any pre-placed files in that directory.
With the copy now writing to a fixed filename (license.lic), the rm
is unnecessary.

Removes the mktemp intermediate since it was only needed to guard
the source file from the rm -f step. With rm -f gone and the
equality check ensuring source != destination, a direct cp is safe.
- Add echo to each license activation branch (key, server, file)
- Add elif ls *.lic branch to detect pre-placed license files,
  matching PPM and rstudio-docker-products behavior
- Replace specific filename equality check with dirname check so any
  *.lic file already inside /var/lib/rstudio-connect/ is treated as
  pre-placed (docs mandate no specific filename)
- Extract _license_dir variable to avoid repeating the path
Writing a license file into a mounted volume pollutes shared
persistent storage and causes race conditions in multi-pod
deployments. Fail loudly with a clear error instead, directing
users to mount the license Secret directly into the data directory
via subPath.
Remove echo before license-manager key/server activation — silent
success is fine, the failure from license-manager itself is the
signal. Redirect remaining file-based license messages to stderr
so they surface correctly in log aggregators and don't pollute
stdout.
The actions/create-github-app-token action recommends client-id over
the legacy app-id input. All three credential secrets (APP_ID,
CLIENT_ID, PEM) are already provisioned; this switches to CLIENT_ID.

Also adds a monthly deprecate-editions workflow that removes product
editions older than 18 months and creates a PR.
@bschwedler bschwedler requested review from a team and ianpittwood as code owners June 9, 2026 21:37
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.

1 participant