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.9.0 #844

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 29, 2024

Mend Renovate

This PR contains the following updates:

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

Release Notes

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

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 becomes conflicted, 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.

@rra
Copy link
Member

rra commented Jul 29, 2024

We won't be updating this here and instead will move the bot to roundtable.

@rra rra closed this Jul 29, 2024
Copy link
Contributor Author

renovate bot commented Jul 29, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.9.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/lsst-sqre-sqrbot-jr-0.x branch July 29, 2024 15:30
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.

1 participant