Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency lsst-sqre/sqrbot-jr to v0.10.0 #860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 30, 2024

This PR contains the following updates:

Package Type Update Change
lsst-sqre/sqrbot-jr Kustomization minor 0.6.0 -> 0.10.0

Release Notes

lsst-sqre/sqrbot-jr (lsst-sqre/sqrbot-jr)

v0.10.0

Compare Source

Backwards-incompatible changes
  • SquarebotSlackMessageValue.user is now nullable. It will be null if the message is a bot_message subtype.
New features
  • Added SquarebotSlackMessageValue.bot_id to capture the ID of the app that send a bot message.

  • Support for Slack block actions interactions. These interactions happen when a user interacts with a message's interactive elements (e.g., buttons, menus). These Slack payloads are parsed into SlackBlockActionsPayload objects and published to a block action Kafka topic ($SQUAREBOT_TOPIC_BLOCK_ACTIONS) with SquarebotSlackBlockActionsKey key and SquarebotSlackBlockActionsValue value models.

  • Support for Slack view submission interactions. These interactions happen when a modal is submitted. These Slack payloads are parsed into SlackViewSubmissionPayload objects and published to a view submission Kafka topic ($SQUAREBOT_TOPIC_VIEW_SUBMISSION) with SquarebotSlackViewSubmissionKey key and SquarebotSlackViewSubmissionValue value models. The value model doesn't yet fully parse the view into Pydantic models; clients will need to inspect the JSON object to get the submitted state of the model. Once more Pydantic modeling of Slack views and Block Kit blocks and elements is implemented, we can update the value model to provide more fully typed messages.

  • Publish AsyncAPI documentation to the /asyncapi endpoint. This documentation site is generated automatically through Faststream.

Bug fixes
  • Fix setting the is_bot property of SquarebotSlackMessageValue to account for messages without the bot_message subtype, but which still have a bot_id set.

  • Improved the Slack message verification so that it now handles both JSON-formatted posts and url-encoded form posts. This change is necessary because Slack sends JSON-formatted posts for messages and url-encoded form posts for interactions. The verification now works for both types of posts.

v0.9.0

Compare Source

Backwards-incompatible changes
  • SquarebotSlackMessageValue no longer includes a bot_id field. Instead, the user field is set to the bot's ID and a new is_bot field indicates if the user field is a bot or user ID.
New features
  • Add support for Slack messages with subtype of bot_message. This is implemented in the Slack message model SlackMessageEventContent as a new subtype field that now takes a SlackMessageSubtype enum. The Kafka representation of this message, SquarebotSlackMessageValue has been updated to now set the user attribute to either the user's ID or the bot's ID as appropriate. A new flag, is_bot indicates if the user field reflects a user or bot (app integration) identifier.

  • SlackMessageEventContent, a part of the SlackkMessageEvent model, now has support for attachments. Slack attachments are deprecated for Block Kit, but are still widely used by app integrations. The attachments field is a list of SlackMessageAttachment objects. These attachments can have text content or individual fields that have titles and values.

  • The SquarebotSlackMessageValue Kafka message model's text field now includes the combined content of the message and its attachments. This makes it easy for consumers to process message content without needing to check for attachments and Block Kit fields. For consumers that are sensitive to the exact structure of the message, the slack_event field is still available, which is the original JSON representation of the Slack message, which can be parsed into a SlackMessageEvent object.

Other changes
  • Adopt ruff-shared.toml from https://github.com/lsst/templates

  • The noxfile now uses uv as the backend for pip and pip-compile tasks.

  • Added a new weekly GitHub Actions CI workflow to validate that the app will run with future versions of dependencies.

v0.8.0

Compare Source

Backwards-incompatible changes
  • Squarebot now publishes messages in JSON, rather than Avro. Consumers should use the Pydantic models published in the rubin-squarebot PyPI package to deserialize messages.

  • The rubin-squarebot PyPI package now uses the rubin.squarebot Python namespace (previously rubinobs.square.squarebot). Consumers should use the rubin.squarebot.models.kafka.SquarebotSlackMessageValue Pydantic model to deserialize Squarebot messages for Slack channel message traffic (or rubin.squarebot.models.kafka.SquarebotSlackMessageValue for the app mention topic).

  • The codebase now uses Pydantic 2.

New features
  • Squarebot now uses FastStream to publish messages. This approach drops the Confluent Schema Registry integration because messages are now published in JSON from Pydantic models, and those Pydantic models are versioned and published through the rubin-squarebot PyPI package.

  • New fields in the SquarebotSlackMessageValue Pydantic model:

    • thread_ts, useful for identify a threaded message and replying to its thread.
    • bot_id, the ID of the bot that sent the message (if applicable). This is useful for identifying bot messages and ignoring them in some cases.
Bug fixes
  • Fix type annotations related in channel_type in rubin.squarebot.models.kafka.SquarebotSlackMessageValue. We now assure that the channel type is not Null here. However the channel_type field is now set to null/None in the SquarebotSlackAppMentionValue model.

  • Fixed the nox -s init command so that it will install into the current Python environment (previously it still installing into the environment managed by nox).

Other changes
  • A Redoc-based OpenAPI documentation page for the REST API is now included in the Sphinx documentation.

  • Switched to nox for running tests and repository tasks. Nox now replaces the two tox configurations for the client and server. Nox also replaces the Makefile for repository tasks:

    • nox -s venv-init initializes a Python venv virtual environment and installs the application into it. Alternatively, nox -s init can be used to initialize the application in the current Python environment (like make init).
    • nox -s update-deps updates the pinned dependencies as well as the pre-commit hooks (replacing make update-deps).
  • New nox integration with scriv for change log management: nox -s scriv-create creates a change log fragment and nox -s scriv-collect X.Y.Z collects change log fragments into CHANGELOG.md for a release.

  • Adopt the lsst-sqre/build-and-push-to-ghcr@v1 action.

  • Tests require a local Kafka broker. The easiest way to run a Kafka broker is with Docker Compose and the kafka-compose.yaml configuration file in this repository. The Docker compose set up also deploys Kafdrop so you can view the messages produced during testing.

  • The codebase is now linted and formatted with Ruff.

v0.7.0

Compare Source

Backwards-incompatible changes
  • sqrbot-jr is now Squarebot. It's docker image is now published at ghcr.io/lsst-sqre/squarebot. The app is also deployed through a Helm chart in lsst-sqre/phalanx, rather than as a Kustomize manifest. See New features for more details.
  • Avro schemas for messages
  • Slack interaction events are currently unsupported; only Slack messages are published to Kafka.
New features
  • Squarebot is rebuilt for the modern SQuaRE app architecture: FastAPI, deployed with Helm through Phalanx.
  • Squarebot uses Pydantic for modelling Avro-encoded Kafka messages. This allows for end-to-end type checking from the HTTP handlers to the messages published to Kafka.
  • The lsst-sqre/squarebot repository is now a monorepo that contains the Squarebot service and a client library (rubin-squarebot on PyPI). The client library contains Pydantic models for the Avro-encoded messages published to Kafka by Squarebot. See SQR-075 for details on the monorepo architecture and SQR-076 background on how Pydantic is used for Kafka message modelling.

Configuration

📅 Schedule: Branch creation - "before 6am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/lsst-sqre-sqrbot-jr-0.x branch from 87c1bcc to 19c3105 Compare October 7, 2024 22:04
@renovate renovate bot force-pushed the renovate/lsst-sqre-sqrbot-jr-0.x branch from 19c3105 to 38cbf98 Compare October 7, 2024 22:07
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.

0 participants