Skip to content

Fixes #37580: Define Collate's job types and Slack socket mode in openmetadata-spec - #37581

Merged
harshach merged 4 commits into
mainfrom
fix/collate-schema-overlays-upstream
Nov 12, 2026
Merged

harshach merged 4 commits into
mainfrom
fix/collate-schema-overlays-upstream

Conversation

@harshach

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #37580

Installing an ontology library pack on a Collate server fails with NoSuchFieldError for BackgroundJob$JobType.ONTOLOGY_PACK_INSTALL. Collate keeps copies of jobs/backgroundJob.json and configuration/slackAppConfiguration.json, adds its own values, and generates classes with OpenMetadata's names from them. Those classes replace OpenMetadata's at runtime, and the job-type copy fell behind when ONTOLOGY_PACK_INSTALL landed. This is the fifth time that copy drifted.

This PR moves Collate's additions into openmetadata-spec, so Collate can delete both copies:

  • backgroundJob.json: the six ADMIN_OPS_* job types Collate queues. OpenMetadata never writes them.
  • slackAppConfiguration.json: optional connectionMode (Webhook | SocketMode, default Webhook) and appToken (format: password). OpenMetadata stores the whole Slack app setting Fernet-encrypted, so appToken is protected without code changes.
  • ADR:2026-11-11-openmetadata-spec-is-the-only-definition-of-its-schemas records the rule: a downstream value or field on an openmetadata-spec schema is added here.

The Collate PR that deletes the copies and stops Collate generating any OpenMetadata class follows this one.

Type of change:

  • Bug fix

High-level design:

N/A — schema additions only. Both additions are optional or unused for OpenMetadata, so no migration is needed: stored job types are strings, and a stored Slack app setting without connectionMode reads as Webhook.

Tests:

Use cases covered

  • The background worker reads a queued job of each ADMIN_OPS_* type. Before this change, mapping the row threw BackgroundJobException.
  • A stored Slack app setting keeps connectionMode: SocketMode and its appToken, and a setting without a mode reads as Webhook.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated: JobDAOTest (6 parameterized cases), SystemRepositorySlackAppSettingTest (new, 2 cases)
  • Local run: JobDAOTest 20/20, SystemRepositorySlackAppSettingTest 2/2.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes). Regenerated TS types only: generated/jobs/backgroundJob.ts, generated/configuration/slackAppConfiguration.ts, generated/settings/settings.ts.

Manual testing performed

  1. Built openmetadata-spec from this branch and regenerated Collate's collate-service against it. Diffed every OpenMetadata class Collate generates against this build's own output: 1,680 identical, 47 differ only in import form, and the 2 that differ in behaviour are the two copies this PR replaces.

UI screen recording:

Not applicable — backend schema change with no UI behaviour.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Decision check: adds ADR:2026-11-11-openmetadata-spec-is-the-only-definition-of-its-schemas.
  • I have added a test that covers the exact scenario we are fixing.

Collate copied jobs/backgroundJob.json and configuration/slackAppConfiguration.json
to add its ADMIN_OPS_* job types and Slack socket mode, and the copies replaced
the OpenMetadata classes at runtime. The job-type copy fell behind again, so
ontology library installs fail on Collate with NoSuchFieldError for
JobType.ONTOLOGY_PACK_INSTALL.

Add the six ADMIN_OPS_* job types and the optional connectionMode (default
Webhook) and appToken fields here, so Collate can delete both copies. Record
that openmetadata-spec is the only definition of its schemas.
@harshach
harshach requested a review from a team as a code owner November 11, 2026 14:42
@harshach harshach added the safe to test Add this label to run secure Github workflows on PRs label Nov 11, 2026
Copilot AI balanced review requested due to automatic review settings November 11, 2026 14:42
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Comment on lines +22 to +24
downstream distribution needs another enum value or field on one of these schemas, the value or
field is added here, even if only that distribution uses it. `backgroundJob.json` therefore lists
the `ADMIN_OPS_*` job types Collate queues, and `slackAppConfiguration.json` carries

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not for this PR, as a possible follow-up for a later release: jobType is a closed enum, so with this rule every new Collate job type needs an openmetadata-spec PR first, and OpenMetadata ships six ADMIN_OPS_* values it never writes.

It might be worth making job types registrable instead: OpenMetadata keeps the types it uses, and a downstream distribution registers its own type name and handler at startup. Collate could then own its ADMIN_OPS_* types in its own code, they could move back out of openmetadata-spec, and this rule would only be needed for fields that are genuinely shared.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Follow-up: #37592 makes BackgroundJob.jobType a string. OpenMetadata keeps its own types as constants in BackgroundJobTypes, the ADMIN_OPS_*/DELETE_* values leave the spec, and Collate owns them in open-metadata/openmetadata-collate#8473. Handler registration already existed (JobHandlerRegistry, dispatched by methodName), so no separate type registry was needed; the ADR gets a v2 amendment saying the rule now applies to shared fields such as the Slack settings, not job types.

Copilot AI balanced review requested due to automatic review settings November 11, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gitar-bot

gitar-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Adding Collate job enum values and Slack Socket Mode credentials to shared schemas could expose compatibility or configuration issues for downstream consumers.

Moves Collate's six ADMIN_OPS_* background job types and its optional Slack socket mode settings (connectionMode, appToken) into openmetadata-spec, so Collate can delete its drifting copies of the schemas. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@harshach
harshach merged commit 9884637 into main Nov 12, 2026
69 of 70 checks passed
@harshach
harshach deleted the fix/collate-schema-overlays-upstream branch November 12, 2026 06:31
sonika-shah added a commit that referenced this pull request Nov 12, 2026
Resolve conflicts with the squashed #37581 (identical content) and with
#37455, which added a CONTEXT_MEMORY_EXTRACTION check and recovery tests
written against the removed BackgroundJob.JobType enum. Both now compare
against BackgroundJobTypes; the "every type but memory extraction" case
lists the same values as strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collate redefines openmetadata-spec job types and Slack settings, so ontology library installs fail on Collate

3 participants