Skip to content

Releases: lsst-sqre/safir

5.0.0a3

13 Nov 17:43
@rra rra
5.0.0a3
eb310f5
Compare
Choose a tag to compare
5.0.0a3 Pre-release
Pre-release

What's Changed

  • Update kubernetes-asyncio requirement from <28 to <29 by @dependabot in #213
  • DM-41630: Add propagation_policy to Kubernetes mock deletes by @rra in #214
  • DM-41630: Support _request_timeout in Kubernetes mock by @rra in #215
  • DM-41630: Fix type of Kubernetes mock _request_timeout by @rra in #218

Full Changelog: 5.0.0a2...5.0.0a3

5.0.0a2

03 Oct 21:30
@rra rra
5.0.0a2
859d7ab
Compare
Choose a tag to compare
5.0.0a2 Pre-release
Pre-release

What's Changed

  • Doc fix: spawn_uvicorn example by @fritzm in #209
  • Update kubernetes-asyncio requirement from <26 to <27 by @dependabot in #208
  • Update kubernetes-asyncio requirement from <27 to <28 by @dependabot in #210
  • Fix spawn_uvicorn documentation by @rra in #211
  • DM-23878: Allow log level enum with any case by @rra in #212

Full Changelog: 5.0.0a1...5.0.0a2

5.0.0a1

18 Sep 22:27
@rra rra
5.0.0a1
2a3e095
Compare
Choose a tag to compare
5.0.0a1 Pre-release
Pre-release

What's Changed

  • DM-398710: Remove GitHubAppClientFactory.create_app_client by @jonathansick in #207
  • DM-40744: Convert to Pydantic v2 by @rra in #204

Full Changelog: 4.5.0...5.0.0a1

4.5.0

12 Sep 22:38
@rra rra
4.5.0
5817676
Compare
Choose a tag to compare

New features

  • Add list_namespaced_custom_object with watch support to the Kubernetes mock.
  • Add watch, field selector, and label selector support to list_namespace in the Kubernetes mock.

Bug fixes

  • The Kubernetes mock now correctly maintains the resource version of Ingress, Job, and Service objects, since they support watches which rely on resource versions.
  • When creating a Pod from a Job in the Kubernetes mock using generateName, randomize the Pod name like Kubernetes does rather than using a fixed name. This forces tests to scan correctly for pods associated with a job. If the Pod name or generateName was explicitly configured in the Job template, honor it.
  • read_namespace and list_namespace in the Kubernetes mock now only return namespace objects that have been explicitly created, not implicit namespaces created by creating another object without making a namespace first. This more closely matches the behavior of Kubernetes while still making it easy to use the mock in a test environment simulating a pre-existing namespace.

What's Changed

  • DM-40691: Add list_namespaced_custom_object to mock by @rra in #200
  • DM-40691: Maintain more resource versions in Kubernetes mock by @rra in #201
  • DM-40691: Make Pod creation from a Job more correct in mock by @rra in #202
  • DM-40691: Add .jinja suffix to scriv template by @rra in #203
  • DM-40691: Add watch support for namespaces by @rra in #205
  • DM-40691: Prepare release 4.5.0 by @rra in #206

Full Changelog: 4.4.0...4.5.0

4.4.0

08 Sep 00:25
@rra rra
4.4.0
0846030
Compare
Choose a tag to compare

New features

  • Add a safir.click.display_help helper function that implements a help command for Click-based command-line interfaces, with support for nested subcommands.
  • Add a new safir.asyncio.AsyncMultiQueue data structure, which is an asyncio multi-reader queue that delivers all messages to each reader independently.
  • Add read_ methods for the Kubernetes object types for which the mock provided create_ methods (NetworkPolicy and PersistentVolumeClaim).

Bug fixes

  • Fix typing of the safir.asyncio.run_with_asyncio decorator so that it doesn't mask the type of the underlying function.
  • Kubernetes objects included in events are now serialized properly using the Kubernetes camel-case field names instead of the Python snake-case names. In addition to matching Kubernetes behavior more closely, this allows a watch configured with the Kubernetes model type to deserialize the object in the object key of the event dictionary. The type must be passed explicitly to the Watch constructor, since kubernetes_asyncio's type autodetection does not work with Safir's mock.
  • safir.testing.kubernetes.patch_kubernetes no longer mocks the entire ApiClient class since it is required for deserialization of objects in Kubernetes events. It instead mocks the request method of that class for safety, to prevent any network requests to Kubernetes clusters when Kubernetes is mocked.

Other changes

  • Safir now uses the Ruff linter instead of flake8 and isort.

What's Changed

  • DM-40495: Fix broken and redirected links by @rra in #192
  • Update redis requirement from <5,>4.5.2 to >4.5.2,<6 by @dependabot in #188
  • Update kubernetes-asyncio requirement from <25 to <26 by @dependabot in #189
  • DM-40495: Improve error reporting from docs-linkcheck by @rra in #191
  • Bump actions/checkout from 3 to 4 by @dependabot in #193
  • DM-40567: Add a helper function for Click command help by @rra in #190
  • DM-40628: Switch to Ruff for linting by @rra in #194
  • DM-40638: Add AsyncMultiQueue data structure by @rra in #195
  • DM-40638: Improve typing of run_with_asyncio by @rra in #196
  • DM-40638: Fix serialization of objects in watch events by @rra in #197
  • DM-40638: Add mock Kubernetes read methods for more kinds by @rra in #198
  • DM-40676: Prepare 4.4.0 release by @rra in #199

Full Changelog: 4.3.1...4.4.0

4.3.1

17 Jul 19:53
@rra rra
4.3.1
bb0c53a
Compare
Choose a tag to compare

Bug fixes

  • Safir now pins the major version of all of its non-development dependencies. The impetus for this change is to prevent upgrades to Pydantic 2.x until Safir's Pydantic models are ready for that upgrade, but a similar principle applies to other dependencies. These pins will be selectively relaxed once Safir has been confirmed to work with a new major release.

What's Changed

  • Fix GitHub webhook example for body by @jonathansick in #180
  • [neophile] Update dependencies by @sqrbot in #181
  • DM-39627: Fix GithHubAppClientFactory parameter names in docs by @rra in #179
  • Pin major versions of dependencies by @rra in #183
  • Update GitHub Actions configuration by @rra in #186
  • DM-40059: Prepare 4.3.1 release by @rra in #187

Full Changelog: 4.3.0...4.3.1

4.3.0

23 May 23:00
@rra rra
4.3.0
7f33e14
Compare
Choose a tag to compare

New features

  • All delete_* APIs in the mock Kubernetes API now support grace_period_seconds and a V1DeleteOptions body. Both are ignored.
  • delete_namespaced_job in the mock Kubernetes API now requires propagation_policy to be passed as a keyword argument if provided, and does not require it be set. It is validated against the values recognized by Kubernetes, and if set to Orphan, pods created by the job are not deleted.

Bug fixes

  • When reporting an error response to Slack using SlackWebException, put the response body in an attachment instead of a regular block, since it may be a full HTML error page. An attachment tells Slack to hide long content by default unless the viewer expands it.

What's Changed

  • DM-39249: Support standard Kubernetes delete options by @rra in #176
  • DM-39249: Put response from SlackWebException in attachment by @rra in #177
  • DM-39249: Prepare 4.3.0 release by @rra in #178

Full Changelog: 4.2.2...4.3.0

4.2.2

17 May 22:51
@rra rra
4.2.2
9463a75
Compare
Choose a tag to compare

Bug fixes

  • Revert the documentation change in 4.2.1 to restore cross-references, since the docs-linkcheck failure appears to be a false positive.

Other changes

  • Safir now uses scriv to maintain its change log.

What's Changed

  • DM-38933: Add missing change log entries for 4.2.0 and 4.2.1 by @rra in #171
  • DM-39251: Switch to scriv for change log management by @rra in #169
  • DM-38933: Revert MockKuberntesApi doc change in 4.2.1 by @rra in #172
  • DM-38933: Fix redirects in documentation by @rra in #173
  • DM-38933: Add documentation on making a GitHub release by @rra in #174
  • DM-38933: Prepare 4.2.2 release by @rra in #175

Full Changelog: 4.2.1...4.2.2

4.2.1

17 May 20:23
acf0613
Compare
Choose a tag to compare

Bug fixes

  • Fix syntax of literals in the MockKubernetesApi docstring.

What's Changed

  • literals, not references, for object method names in docstrings by @athornton in #170

Full Changelog: 4.2.0...4.2.1

4.2.0

17 May 20:01
56411e1
Compare
Choose a tag to compare

New features

  • Add create, delete, read, list (with watches), and (limited) patch support for Ingress objects to the mock Kubernetes API.
  • Add create, delete, read, and list (with watches) support for Job objects to the mock Kuberntes API, and mock the BatchV1Api.
  • Add delete, read, and list (with watches) support for Service objects to the mock Kubernetes API.
  • Add support for label selectors to list_namespaced_pod in the mock Kubernetes API.
  • Add create_namespaced_persistent_volume_claim to the mock Kubernetes API for testing.
  • Add support for deleting custom resources to the mock Kubernetes API.

Bug fixes

  • SlackWebException now extracts the method and URL of the request from more httpx exceptions, and avoids exceptions when the request information is not present.

What's Changed

  • DM-38425: Extract more data from httpx exceptions by @rra in #167
  • DM-39232: Add support for creating PVCs to Kubernetes mock by @rra in #168
  • tickets/DM-38972 : add fileserver object support by @athornton in #166

Full Changelog: 4.1.0...4.2.0