Skip to content

Releases: lsst-sqre/times-square

0.13.0

12 Sep 19:12
a52110f
Compare
Choose a tag to compare

New features

  • Times Square now specifies a timeout for notebook executions with Noteburst. This provides better feedback for notebook executions that have hung, either when rendering new pages for users, for when doing a GitHub Check Run. Currently this timeout is set app-wide with the TS_DEFAULT_EXECUTION_TIMEOUT environment variable. The default timeout is 60 seconds. In the future we intend to add per-notebook timeout configuration.

  • Times Square enforces a timeout when polling for Noteburst results during a GitHub Check run. This prevents the Check Run from hanging indefinitely if the Noteburst service is unable to time out a notebook execution or fails for any reason. This timeout is configurable via the TS_CHECK_RUN_TIMEOUT environment variable. The default timeout is 600 seconds.

What's Changed

Full Changelog: 0.12.0...0.13.0

0.12.0

05 Sep 18:54
4f77663
Compare
Choose a tag to compare

New features

  • Improved feedback in GitHub Check Runs:

    • If a YAML file has bad syntax causing a parsing error, we now post the YAML error as a check run annotation — including the location of the error in the file.

    • If the notebook has incorrect Jinja templating in its Markdown cells, we now post a check run annotation with the error message and cell number.

Other changes

  • Adopt uv and tox-uv for pinning and installing dependencies

  • Pin the tox dependencies with a requirements/tox.[in|txt] file

  • Adapt configuration for tox-docker version 5's randomized connection ports

  • Adopt ruff-shared.toml for common SQuaRE ruff configuration.

  • The GitHub Check Run service methods are now part of a new GitHubCheckRunService class, separate from the GitHubRepoService. This internal change helps clarify what functionality is needed for the GitHub Checks functionality, as opposed to syncing data with GitHub repositories.

What's Changed

  • [neophile] Update dependencies by @neophile-square in #73
  • DM-46065: Update for tox-docker 5 and ruff-shared.toml by @jonathansick in #78
  • Bump python from 3.12.2-slim-bullseye to 3.12.5-slim-bullseye by @dependabot in #79
  • DM-46095: Improve GitHub check run feedback by @jonathansick in #80

Full Changelog: 0.11.0...0.12.0

0.11.0

27 Mar 15:10
763887d
Compare
Choose a tag to compare

New features

  • New support for background recomputation of a page instance (cached HTML) with the new DELETE /v1/pages/:page/html?{params} endpoint. This endpoint triggers a Noteburst computation of the page instance and deletes the currently-cached HTML once that computation is complete. This API provides a way for users to request a recomputation of a page instance without affecting other users that may be viewing that page instance.
  • A new server-sent events endpoint for getting updates on the status of a page instance's computation and HTML rendering: GET /v1/pages/:page/html/events?{params}. This endpoint should replace the current practice of clients polling the GET /v1/pages/:page/htmlstatus endpoint to determine when a page instance's HTML is ready to be displayed. The events endpoint also provides additional metadata, such as the time when the current computation job was queued so that clients can provide more detailed status information to users. This endpoint works well with the new DELETE /v1/pages/:page/html?{params} endpoint, as it can provide updates on the status of the recomputation job while still linking to the existing cached HTML.

What's Changed

  • Bump pre-commit/action from 3.0.0 to 3.0.1 by @dependabot in #71
  • DM-43327: Add background replacement of cached page renders by @jonathansick in #72

Full Changelog: 0.10.0...0.11.0

0.10.0

13 Mar 17:19
a623beb
Compare
Choose a tag to compare

New features

  • We've adopted Safir's safir.fastapi.ClientRequestError so that errors like 404 and 422 (input validation) now use the same error format as FastAPI uses for its built-in model validation errors. For parameter errors from endpoints like GET /v1/pages:page/html the parameter name is now part of the loc field in the error message.
  • Times Square and its worker now send uncaught exceptions to a Slack webhook for better error reporting. The webhook URL is set in the TS_SLACK_WEBHOOK_URL environment variable.

Other changes

  • Updated to Python 3.12
  • Updated to Pydantic 2
  • Adopted Ruff for linting and formatting, replacing black, flake8, and isort.
  • Switch to using Annotated for Pydantic models and FastAPI path functions.

What's Changed

  • [neophile] Update dependencies by @neophile-square in #62
  • [neophile] Update dependencies by @neophile-square in #63
  • [neophile] Update dependencies by @neophile-square in #64
  • [neophile] Update dependencies by @neophile-square in #65
  • DM-43173: Update to ruff linting and pydantic 2 by @jonathansick in #69
  • DM-43264: Adopt Safir ClientRequestError and Slack messaging for internal errors by @jonathansick in #70

Full Changelog: 0.9.2...0.10.0

0.9.2

21 Sep 21:26
5c52741
Compare
Choose a tag to compare

Bug fixes

  • Fix how strings are rendered in the parameters cell of notebooks. Previously string parameters were missing Python quotes. Now parameters are passed to Jinja in their repr string forms to be proper Python code.

What's Changed

  • Bump actions/checkout from 3 to 4 by @dependabot in #58
  • Bump python from 3.11.4-slim-bullseye to 3.11.5-slim-bullseye by @dependabot in #57
  • [neophile] Update dependencies by @neophile-square in #59
  • DM-40865: Fix rendering string values in parameters cell by @jonathansick in #60

Full Changelog: 0.9.1...0.9.2

0.9.1

31 Jul 21:47
ff512ce
Compare
Choose a tag to compare

Bug fixes

  • When a page is updated (e.g., from a GitHub pull request merge), the HTML renders for that page are cleared.
  • Fixed a bug where updating a page and executing it with defaults would result in two requests to Noteburst.
  • Deleting a page now deletes the page's HTML renders.

What's Changed

  • [neophile] Update dependencies by @neophile-square in #55
  • DM-40250: Delete nbhtml instances from redis when a page updates by @jonathansick in #56

New Contributors

  • @neophile-square made their first contribution in #55

Full Changelog: 0.9.0...0.9.1

0.9.0

27 Jul 23:06
c5e571d
Compare
Choose a tag to compare

Backwards-incompatible changes

  • New treatment for templating in notebooks. Times Square no longer treats all cells as Jinja templates. Instead, the first cell is considered to be under the control of Times Square for setting variables. When a parameters are rendered into a notebook, the first code cell is replaced with new source that sets the parameter variables to their values. This means that notebook authors can now use that first cell to set and experiment with parameter values for interactive debugging, knowing that Times Square will replace that cell with new values when the notebook is rendered.

Bug fixes

  • Parameter names are now validated against Python keyword names using keyword.iskeyword(). This prevents parameter names from shadowing Python keywords.

What's Changed

Full Changelog: 0.8.0...0.9.0

0.8.0

27 Jul 18:12
3fd1beb
Compare
Choose a tag to compare

New features

  • Add a new TS_GITHUB_ORGS environment variable. This can be set to a comma-separated list of GitHub organizations that can install the Times Square GitHub App and sync notebooks into the Times Square service. This is a an important security feature if the Times Square GitHub App is set to public so that multiple GitHub organizations can sync repositories with Times Square. GitHub webhook handlers filter out events from non-accepted organizations. The GitHubRepoService also checks the ownership on initialization.

Other changes

  • Adopt scriv for managing the changelog.

  • Adopt ruff for linting, and update the codebase accordingly.

  • Adopt the new neophile workflow for managing dependencies.

  • Adopt the new lsst-sqre/build-and-push-to-ghcr GitHub Action for building and pushing Docker images.

  • Adopt the new FastAPI lifespan function for handling start-up and shutdown.

  • Create a Sphinx documentation site at times-square.lsst.io.

  • Add documentation for configuring the Times Square GitHub App, including a sample URL with the app settings built-in.

What's Changed

Full Changelog: 0.7.0...0.8.0

0.7.0

19 Apr 17:24
2ffb96e
Compare
Choose a tag to compare
  • Adopt safir.redis.pydantic for Redis-backed storage.
  • Adopt safir.github creating the GitHub App client and modelling of GitHub resources with Pydantic.
  • Fix handling of disabled pages so that they aren't executed in a GitHub check, and are dropped if they previously existed in the database.
  • Update to Python 3.11

What's Changed

  • Bump python from 3.10.6-slim-bullseye to 3.10.7-slim-bullseye by @dependabot in #44
  • DM-38650: Adopt safir.redis and safir.github modules by @jonathansick in #50

Full Changelog: 0.6.0...0.7.0

0.6.0

18 Aug 23:46
58d0b0f
Compare
Choose a tag to compare

Times Square now exposes information about pages created during GitHub PR check runs:

  • GET /times-square/api/v1/github-pr/:org/:repo/:sha provides metadata for a repository's check run in general, such as the contents in the check run and the GitHub pull request or check run.
  • GET /times-square/api/v1/github-pr/:org/:repo/:sha/:path provides metadata about a specific notebook.

Times Square check runs also link to the pull request preview pages published through Times Square's interface in Squareone.

What's Changed

  • Bump python from 3.10.5-slim-bullseye to 3.10.6-slim-bullseye by @dependabot in #43
  • DM-35816: Support for viewing GitHub PR previews in Squareone by @jonathansick in #42

Full Changelog: 0.5.0...0.6.0