Skip to content

[HWORKS-2457] Support for versioning in serving deployments - #679

Open
javierdlrm wants to merge 1 commit into
logicalclocks:mainfrom
javierdlrm:HWORKS-2457
Open

javierdlrm wants to merge 1 commit into
logicalclocks:mainfrom
javierdlrm:HWORKS-2457

Conversation

@javierdlrm

@javierdlrm javierdlrm commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

https://hopsworks.atlassian.net/browse/HWORKS-2457

Documents versioning in serving deployments, for model deployments and Python deployments.

  • New guide user_guides/mlops/serving/deployment-versions.md: what a version holds and what belongs to the deployment instead, saving a new version, inspecting the versions and rolling back (web UI and Python API), the conflict raised by concurrent changes, and where each version's files are stored.
  • serving/index.md and serving/deployment.md link to the guide.
  • python-deployment.md gains a short Versions section.
  • mkdocs.yml adds the nav entry.
  • After review: when a save restarts the deployment and when it does not, an in-place save keeps DEPLOYMENT_VERSION and the deployment_version logging column, scripts from a HopsFS path or git are stored as that path, rollback stays available while a version is updating, the scaling example, screenshots of the three UI actions, and the new serving error codes 240052 to 240055 in the REST error code reference.

Merge order

The guide's API reference links to Deployment.get_versions, Deployment.rollback and DeploymentVersion, which come with logicalclocks/hopsworks-api#1225. Merge after that PR, or the strict build fails on the unresolved references.

Related: logicalclocks/hopsworks-ee#3412, logicalclocks/hopsworks-front#2139, logicalclocks/loadtest#1085, logicalclocks/hopsworks-helm#2435.

Verification

hopsworks-docs check, markdownlint and snakeoil pass locally, with hopsworks-api installed from the HWORKS-2457 branch.

🤖 Generated with Claude Code

@javierdlrm
javierdlrm requested a review from robzor92 October 2, 2026 11:56

@robzor92 robzor92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reads well. I checked it against ee#3412 and api#1225 at their heads:

  1. Deprecated API in the examples. Both use predictor.resources.num_instances = 2 (deployment-versions.md:89, python-deployment.md:251), which is deprecated and emits a DeprecationWarning. Use the scaling configuration instead.

  2. Restarts (deployment-versions.md:21). "Running instances restart only when the active configuration changes, so a save without changes does not restart the deployment" is true for Save. Two consequences need saying:

    • Save no longer restarts a deployment after you edit a script on the HopsFS mount or add libraries to its environment. Use restart(), or stop and start.
    • Save as new version always creates a version and restarts the deployment, even with no change.
  3. Scripts in a version (:28). "A version holds … the predictor and transformer scripts" doesn't hold for Python deployments that read the script from the HopsFS mount or from git. Their version stores the path, not the file, so rolling back doesn't bring the old code back. Worth a note in the Python deployment section too.

  4. Version number on in-place saves. An in-place Save keeps the version number, so DEPLOYMENT_VERSION and the feature-logging deployment_version column stay the same across a script change. Logs from before and after the change can't be told apart. Before this change, uploading a new script bumped the number.

  5. CI. CI is red only on the three unresolved hsml references. Merge after api#1225, as the description says.

@javierdlrm
javierdlrm force-pushed the HWORKS-2457 branch 2 times, most recently from c5e76ff to 779d047 Compare October 2, 2026 15:33
@javierdlrm

Copy link
Copy Markdown
Contributor Author

@robzor92 Thanks. Changes:

  1. The example uses scaling_configuration.min_instances/max_instances. The Python deployment section no longer has a code block.
  2. The intro states that a save without changes neither restarts the deployment nor creates a version, in either mode. It names the two exceptions ee#3412 now implements (a script from a HopsFS path or git, and a changed environment), and says how to restart without saving.
  3. Both the guide and the Python deployment section say that a script from a HopsFS path or git is stored as that path, so a rollback restores the configuration but not the code.
  4. Added a note that an in-place save keeps DEPLOYMENT_VERSION and the deployment_version logging column, so use "Save as new version" to keep predictions apart.
  5. Agreed, merge after api#1225.

Also added the new serving error codes 240052-240055 to the REST error code reference, and that rollback stays available while a version is updating.

https://hopsworks.atlassian.net/browse/HWORKS-2457

Deployments now keep a numbered history of their configuration. A save
either edits the active version in place or stores a new version, and a
rollback reactivates an earlier one without copying files. This applies
to model deployments and to Python deployments.

A new Deployment Versions guide describes what a version holds and what
belongs to the deployment instead, how to save a new version, inspect
the versions and roll back from the web UI and the Python API, the
conflict a concurrent change raises, and where the files of each
version are stored. The serving overview and the deployment guide link
to it, and the Python deployment guide gains a short Versions section.

The guide states when a save restarts the deployment and when it does
not, that an in-place save keeps the version number seen by the
deployment and by feature logging, that a script read from a HopsFS path
or git is stored as that path, and that a rollback stays available while
a version is updating. The examples set the instance count through the
scaling configuration. The REST error code reference lists the new
serving codes 240052 to 240055. The web UI steps show the save menu, the
Details button and the Roll back button, and what a version holds is a
table. It also says that a rollback while updating starts a new rollout
while the current instances keep serving, and that an edit saved in
place cannot be rolled back.

Signed-off-by: Javier de la Rúa Martínez <javier@logicalclocks.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants