Benjamin Labrecque and Claude Opus 5
cfd3ecad6c
refactor: centralize deploy-time substitutions (steps 1-2)
...
Deploy-time placeholders were spread across four independent
implementations: sed in the Gitea deploy script, ansible.builtin.replace
in two playbooks, a hardcoded suffix in bin/sls_hla_launch_gui.sh, and
another in agebd/pv.py. Each defined its own values, so nothing kept them
in sync and a missed substitution failed silently.
Step 1 -- one source of truth:
* config/environments.yml declares every deploy-time token, its value
per environment, and where tokens are allowed to live. An environment
that is missing a token, or defines an undeclared one, is a load-time
error.
* agebd.subs loads it and renders. Rendering is a strict regex over
declared token names rather than a template engine: the rendered
files are EPICS db/substitution files and Qt XML, and an unknown
token must raise rather than survive into the output.
* scripts/ci/check_subs.py enforces the contract in CI: tokens in a
rendered path are declared, declared tokens only appear where they
are rendered or generated, and no pre-migration delimiters survive.
Step 2 -- separate the two substitution stages by delimiter:
* Creation-time (copier, once per new service) keeps {{ token }}.
Deploy-time (every deploy, per environment) becomes @@token@@.
* This drops the {{ '{{ token }}' }} escaping from templates/, which
existed only because one Jinja pass had to emit syntax for a second.
* Angle brackets were tried first and rejected: << >> is not
well-formed XML, and cli parses qt/*.ui with ElementTree.
* The existing sed and ansible consumers are repointed at the new
delimiters so this stays behaviour-preserving. Routing them through
agebd.subs is step 3.
Also fixes, as a side effect of having one implementation:
* The sed pattern '{{ *agebd_env_suffix_upper* }}' quantified 'r'
rather than the space, so it only matched one exact spacing.
* agebd.subs.read_ioc_port compares service names case-insensitively;
ansible/tasks/utils/get-ioc-port.yml still compares CamelCase
registry names against a lowercase input and never matches.
qt/*.ui is declared as a render path but nothing renders it yet -- the
Qt deploy step is still a plain rsync. Wiring that up is step 4.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-20 11:26:49 +02:00
labrec_b and Benjamin Labrecque
a06fded916
Use explicit agebd_env_suffix lower/upper ( #65 )
...
Deploy / deploy (push) Failing after 42s
Sub env vars cicd
Co-authored-by: Benjamin Labrecque <labrecque.benji@gmail.com >
Reviewed-on: #65
2026-08-05 11:02:18 +02:00
Benjamin Labrecque
0bf7f179de
chore: change user -> ioc_owner
2026-07-28 08:40:22 +02:00
Benjamin Labrecque
90bd22c0e5
feat: add to AGEBD PVs in ui files
2026-07-27 08:56:05 +02:00
Benjamin Labrecque
ce1ff1148a
feat: write ui file to qt/ dir on new service creation
2026-07-27 08:39:07 +02:00
Benjamin Labrecque
f758bfe807
chore: add python unbuffered to systemd unit files
Deploy / deploy (push) Successful in 1m10s
2026-07-24 16:37:33 +02:00
Benjamin Labrecque
c341972362
chore: use sls2om package from gitea sls org
Deploy / deploy (push) Failing after 1m22s
2026-07-24 14:09:34 +02:00
labrec_b and Benjamin Labrecque
e098f8b019
chore: remove pv external and only append -DEV suffix on service internal PVs ( #11 )
...
Deploy / deploy (push) Failing after 1s
Use service name to determine whether to use dev or prod PVs in dev environment
---------
Co-authored-by: Benjamin Labrecque <labrecque.benji@gmail.com >
Reviewed-on: #11
2026-07-24 09:37:03 +02:00
Benjamin Labrecque
e310453487
cli: add tests for agebd service new
2026-07-23 15:41:22 +02:00
Benjamin Labrecque
c4a5f065f8
chore: move pyepics to required dependencies
Deploy / deploy (push) Canceled after 0s
2026-07-17 16:56:20 +02:00
Benjamin Labrecque
726265257c
chore: use agebd_env_suffix in ioc params files
Deploy / deploy (push) Successful in 1m21s
2026-07-17 10:05:30 +02:00
Benjamin Labrecque
5ac6c2605d
chore: use agebd_env_suffix in ioc subs files
Deploy / deploy (push) Successful in 1m56s
2026-07-17 09:57:18 +02:00
Benjamin Labrecque
b4226897df
test: cicd
Deploy / deploy (push) Successful in 25s
2026-07-15 16:10:51 +02:00
Benjamin Labrecque
137bdab752
test: cicd
Deploy / deploy (push) Failing after 6s
2026-07-15 16:03:27 +02:00
Benjamin Labrecque
9bafe6ca87
chore: fix python to 3.10 so local and dev/prod match
2026-07-15 15:54:23 +02:00
Benjamin Labrecque
c1250639e4
fix: cicd
Deploy / deploy (push) Successful in 27s
2026-07-15 15:29:05 +02:00
Benjamin Labrecque
72f2a68b00
fix: cicd
Deploy / deploy (push) Successful in 12s
2026-07-15 15:24:16 +02:00
Benjamin Labrecque
f11a47dabb
fix: cicd
Deploy / deploy (push) Failing after 0s
Deploy / deploy (push) Successful in 1s
2026-07-15 15:19:17 +02:00
Benjamin Labrecque
7ef3b172ab
fix: cicd
Deploy / deploy (push) Failing after 1s
2026-07-15 15:03:40 +02:00
Benjamin Labrecque
ff6cede146
fix: python apps
Deploy and restart modified services / deploy (push) Successful in 23s
Deploy bin / deploy (push) Successful in 1s
2026-07-15 14:13:50 +02:00
Benjamin Labrecque
00f648e909
fix: cicd
Deploy and restart modified services / deploy (push) Successful in 20s
2026-07-15 13:50:52 +02:00
Benjamin Labrecque
b46121b9ff
fix: cicd
Deploy and restart modified services / deploy (push) Failing after 9s
2026-07-15 13:47:52 +02:00
Benjamin Labrecque
510b4be301
fix: cicd
Deploy and restart modified services / deploy (push) Successful in 13s
2026-07-15 13:42:29 +02:00
Benjamin Labrecque
6b88c14f80
fix: cicd
Deploy and restart modified services / deploy (push) Failing after 8s
2026-07-15 13:40:37 +02:00
Benjamin Labrecque
29b6eeb1df
fix: cicd
Deploy and restart modified services / deploy (push) Successful in 15s
2026-07-15 12:44:50 +02:00
Benjamin Labrecque
e1964c1d70
feat: restructure python app and add option to add tests for apps
Deploy and restart modified services / deploy (push) Successful in 12s
Deploy bin / deploy (push) Successful in 2s
2026-07-15 12:18:53 +02:00
Benjamin Labrecque
fa984b4f30
chore: remove unused pvlink
2026-07-14 09:02:04 +02:00
Benjamin Labrecque
b38c3c08c0
docs: epics docs
2026-07-13 15:25:45 +02:00
Benjamin Labrecque
9ed113f341
ui: better default ui
2026-07-10 12:19:32 +02:00
Benjamin Labrecque
b14f4ff36f
ui: better default ui
2026-07-10 12:03:41 +02:00
Benjamin Labrecque
530391d0e7
chore: reset python template
2026-07-10 09:41:36 +02:00
Benjamin Labrecque
b7d1ec3d31
chore: test writing to pv
2026-07-10 09:23:04 +02:00
Benjamin Labrecque
d56afee88b
chore: test writing to pv
2026-07-10 09:22:33 +02:00
Benjamin Labrecque
9f17564989
template: write random val to pv
Deploy bin / deploy (push) Successful in 2s
Deploy agebd python package / deploy (push) Successful in 5s
2026-07-09 16:47:17 +02:00
Benjamin Labrecque
f23d43e91c
chore: update default ui in template
Deploy bin / deploy (push) Successful in 3s
Deploy agebd python package / deploy (push) Successful in 3s
2026-07-09 16:17:39 +02:00
Benjamin Labrecque
89434d24a0
chore: better cli params for ui configs
Deploy bin / deploy (push) Successful in 1s
Deploy agebd python package / deploy (push) Successful in 3s
2026-07-09 15:28:18 +02:00
Benjamin Labrecque
debac0cf5e
refactor: remove service id altogether
Deploy bin / deploy (push) Successful in 2s
Deploy agebd python package / deploy (push) Successful in 4s
2026-07-08 16:47:42 +02:00
Benjamin Labrecque
6960b10ce0
feature: dynamicallt allocate port and save in service registry. Update iocs overview on service creation
Deploy bin / deploy (push) Successful in 5s
Deploy agebd python package / deploy (push) Successful in 2s
2026-07-08 14:40:18 +02:00
Benjamin Labrecque
cd94cb3b7e
chore: add callback PV to template
Deploy bin / deploy (push) Successful in 2s
Deploy agebd python package / deploy (push) Successful in 2s
2026-07-08 12:11:16 +02:00
Benjamin Labrecque
1e19517930
fix: systemd template
Deploy bin / deploy (push) Successful in 1s
Deploy agebd python package / deploy (push) Successful in 3s
2026-07-08 12:04:58 +02:00
Benjamin Labrecque
3b5523ec9e
fix: default PV names in template
Deploy bin / deploy (push) Successful in 4s
Deploy agebd python package / deploy (push) Successful in 3s
2026-07-08 12:02:09 +02:00
Benjamin Labrecque
39f38d6bb9
chore: change default PVs in template python app
Deploy bin / deploy (push) Successful in 1s
Deploy agebd python package / deploy (push) Successful in 1s
2026-07-08 11:53:32 +02:00
Benjamin Labrecque
dfd6e1eb4a
cli: use correct ioc host
Deploy bin / deploy (push) Successful in 1s
Deploy agebd python package / deploy (push) Successful in 4s
2026-07-08 09:36:16 +02:00
Benjamin Labrecque
a9902d47c5
chore: fix agebd relative path
Deploy bin / deploy (push) Successful in 8s
Deploy, build and restart MASTER / deploy (push) Successful in 10s
Deploy agebd python package / deploy (push) Successful in 2s
2026-07-07 09:33:13 +02:00
Benjamin Labrecque
fbc4a57953
refactor: move all services under current/
Deploy bin / deploy (push) Successful in 1s
Deploy, build and restart MASTER / deploy (push) Successful in 9s
Deploy agebd python package / deploy (push) Successful in 1s
2026-07-07 09:29:04 +02:00
Benjamin Labrecque
3618906f40
fix: template brackets
Deploy bin / deploy (push) Successful in 3s
Deploy service MASTER / deploy (push) Failing after 6s
2026-07-06 12:27:15 +02:00
Benjamin Labrecque
f9de788baf
chore: change deploy paths to move prod/dev at top level -- /sls/bd/hla/dev/...
Deploy bin / deploy (push) Canceled after 0s
Deploy service MASTER / deploy (push) Canceled after 0s
2026-07-03 16:26:46 +02:00
Benjamin Labrecque
33b56dec66
chore: rename template files to handle gitea rendering
Deploy bin / deploy (push) Canceled after 0s
Deploy service MASTER / deploy (push) Canceled after 0s
2026-07-03 15:09:46 +02:00
Benjamin Labrecque
09edcf53a2
chore: fix templating
Deploy bin / deploy (push) Canceled after 0s
Deploy service MASTER / deploy (push) Canceled after 0s
2026-07-03 15:02:08 +02:00
Benjamin Labrecque
c7604359a9
feature: add new service template files rendering
Deploy bin / deploy (push) Canceled after 0s
Deploy service MASTER / deploy (push) Canceled after 0s
2026-07-03 14:06:25 +02:00