Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Release notes for the AD Build System (Software Factory)

## Releases:
* tag:1.2.3 13-Apr-2026 P. Nisperos (pnispero)
* Fix admin onboard git workflow file with brackets missing

* tag:1.2.2 10-Apr-2026 P. Nisperos (pnispero)
* Fix admin onboard post steps

Expand Down
12 changes: 6 additions & 6 deletions bs_cli/adbs_cli/admin_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,12 @@ def onboard_repo(ctx, verbose: bool=False):
deploy:
uses: ad-build-test/build-system-playbooks/.github/workflows/request-deployment.yml@main
with:
deploy_to_dev: ${{ inputs.deploy_to_dev }}
deploy_to_lcls: ${{ inputs.deploy_to_lcls }}
deploy_to_facet: ${{ inputs.deploy_to_facet }}
deploy_to_testfac: ${{ inputs.deploy_to_testfac }}
tag: ${{ inputs.tag }}
playbook: '{playbook}'
deploy_to_dev: ${{{{ inputs.deploy_to_dev }}}}
deploy_to_lcls: ${{{{ inputs.deploy_to_lcls }}}}
deploy_to_facet: ${{{{ inputs.deploy_to_facet }}}}
deploy_to_testfac: ${{{{ inputs.deploy_to_testfac }}}}
tag: ${{{{ inputs.tag }}}}
playbook: '{playbook}'
"""
deploy_yml_path = os.path.join(top_level, '.github/workflows/deploy.yml')
os.makedirs(os.path.dirname(deploy_yml_path), exist_ok=True)
Expand Down
Binary file removed bs_cli/dist/adbs_cli-1.2.2.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added bs_cli/dist/adbs_cli-1.2.3.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion bs_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Avoided using pyproject.toml, becuase can't get an editable version installed (pip install -e .)
setup(
name='adbs_cli',
version='1.2.2',
version='1.2.3',
description="Command line interface for the accelerator directorate build system (software factory)",
author="Patrick Nisperos, Jerry Katzung, Claudio Bisegni",
author_email="pnispero@slac.stanford.edu, katzung@slac.stanford.edu, bisegni@slac.stanford.edu",
Expand Down
14 changes: 13 additions & 1 deletion deploy_controller/deployment_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ class DeployDict(Component):
artifact_type: Optional[str] = None # rpm, tar, zip
# Generic extra vars forwarded to the playbook as-is
extra_vars: Optional[dict] = None
# When True, blocks until deployment completes and returns full result (used by CBS webhook)
sync: Optional[bool] = False

class InitialDeploymentDict(Component):
# Used for the initial deployment endpoint
Expand Down Expand Up @@ -737,10 +739,20 @@ async def revert_ioc_deployment(ioc_to_deploy: RevertDict, background_tasks: Bac
@app.put("/deployment")
async def deploy(deploy_request: DeployDict, background_tasks: BackgroundTasks):
"""Unified deployment endpoint. Routes to IOC, PyDM, container, or generic handler
based on the playbook field (e.g. 'ioc_module/...', 'pydm_module/...', 'container_module/...')."""
based on the playbook field (e.g. 'ioc_module/...', 'pydm_module/...', 'container_module/...').
When deploy_request.sync=True, blocks until deployment completes and returns the full result (success, elog_url).
When deploy_request.sync=False (default), returns immediately with a task_id for status polling."""
task_id = str(uuid.uuid4())
task = DeploymentTask(task_id, save_callback=save_task)
save_task(task)
if deploy_request.sync:
await deploy_async(task_id, deploy_request)
final_task = get_task(task_id)
if final_task and final_task.status == "completed":
return JSONResponse(status_code=200, content=final_task.result)
else:
error = final_task.error if final_task else "Unknown error"
return JSONResponse(status_code=500, content={"success": False, "elog_url": "", "error": error})
background_tasks.add_task(deploy_async, task_id, deploy_request)
return JSONResponse(status_code=202, content={"task_id": task_id, "status": "pending"})

Expand Down