Skip to content

Feat: Enable celery workers and beat#724

Open
maltesander wants to merge 39 commits intomainfrom
feat/enable-celery-workers
Open

Feat: Enable celery workers and beat#724
maltesander wants to merge 39 commits intomainfrom
feat/enable-celery-workers

Conversation

@maltesander
Copy link
Copy Markdown
Member

@maltesander maltesander commented Apr 23, 2026

Description

Added two new roles. worker and beat (max 1 replica).

  • New integration test works
  • Logging configurable (currently hardcoded info for worker & beat)
  • Docs missing, examples etc not updated yet.

Currently, RESULTS_BACKEND only supports Redis, no S3 support.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@maltesander maltesander self-assigned this Apr 23, 2026
@maltesander maltesander changed the title Feat: Eenable celery workers and beat Feat: Enable celery workers and beat Apr 23, 2026
@maltesander maltesander moved this to Development: In Progress in Stackable Engineering Apr 24, 2026
@maltesander maltesander linked an issue Apr 25, 2026 that may be closed by this pull request
@maltesander maltesander marked this pull request as ready for review April 27, 2026 09:28
@maltesander maltesander moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Apr 27, 2026
@adwk67 adwk67 self-requested a review April 27, 2026 14:54
@adwk67 adwk67 moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Apr 27, 2026
Comment thread docs/modules/superset/pages/usage-guide/celery-async-queries.adoc
Copy link
Copy Markdown
Member

@adwk67 adwk67 left a comment

Choose a reason for hiding this comment

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

Looks good - mainly minor things.

host: superset-postgresql
database: superset
credentialsSecretName: superset-postgresql-credentials
celeryResultsBackend:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In Airflow, we put celeryResultsBackend and celeryBroker in the worker so that they are included where needed. Should we do the same here for consistency?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sebastian mentioned the same thing. I think this is wrong in Airflow.
It is used by ALL roles, so clearly belongs into the clusterConfig. I wont push it down to workers just to avoid some consistency checks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's more to do with avoiding unintended misconfiguration: yes, it is used by all roles, but it is only relevant if the resource has a worker role defined in the first place. It's easier to overlook inconsistencies if the dependency is less obvious.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

By that logic, why is the metadata database clusterConfig (only the webserver needs it)? Or any authorization/authentication in many cases? We might need it in the future and this is clearly "clusterWide" configuration.

As said, i think it is just plain wrong in Airflow (or at least bad design). The clusterConfig is exactly there to avoid having to cross reference stuff between "siblings". It is a bad practice in programming and bad API design because you introduce in-transparency where not needed.

Copy link
Copy Markdown
Member

@adwk67 adwk67 Apr 28, 2026

Choose a reason for hiding this comment

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

Why is it bad design to have a section of config - that is only relevant to an optional role - defined as part of that role? Apart from opensearch (which is different in many ways), I can only think of Airflow (kubernetes vs. celery executors), Kafka (optional controller role) and Superset (optional worker/beat roles) where we have that in the platform. Do we have other operators where we include things under clusterconfig only for optional roles?

Copy link
Copy Markdown
Member

@adwk67 adwk67 Apr 28, 2026

Choose a reason for hiding this comment

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

By that logic, why is the metadata database clusterConfig (only the webserver needs it)

The difference here is that the webserver role is not optional.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is a bad design because the assumption that it is only relevant to an optional role is wrong.
Once the role is defined, it is relevant to ALL roles.

A webserver role should not be concerned with anything in the worker role. If it needs anything from the worker, this is already a clear sign that the API design is bad :-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

By that logic, why is the metadata database clusterConfig (only the webserver needs it)

The difference here is that the webserver role is not optional.

Well, then even more points to put it into its own role...?

Comment thread tests/templates/kuttl/celery-worker/40-assert.yaml
Comment thread rust/operator-binary/src/config/superset.rs Outdated
///
/// Ignored otherwise.
#[serde(skip_serializing_if = "Option::is_none")]
pub celery_results_backend: Option<CeleryResultsBackendConnection>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See other comment: in airflow this is part of the worker

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Very against it :)

Comment thread rust/operator-binary/src/resources/deployment.rs
Comment thread rust/operator-binary/src/resources/deployment.rs
Comment thread rust/operator-binary/src/superset_controller.rs Outdated
@adwk67
Copy link
Copy Markdown
Member

adwk67 commented Apr 28, 2026

Openshift tests 🟢 https://testing.stackable.tech/view/02%20Operator%20Tests%20(custom)/job/superset-operator-it-custom/45/

We will bring up the CR open question in the planning meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

Support Async Queries via Celery

2 participants