Repository navigation
Fixes #37580: Define Collate's job types and Slack socket mode in openmetadata-spec - #37581
Conversation
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.
❌ PR checklist incompleteThis 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 |
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Code Review ✅ Approved 🟡 Medium riskAdding 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 VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
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.
Describe your changes:
Fixes #37580
Installing an ontology library pack on a Collate server fails with
NoSuchFieldErrorforBackgroundJob$JobType.ONTOLOGY_PACK_INSTALL. Collate keeps copies ofjobs/backgroundJob.jsonandconfiguration/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 whenONTOLOGY_PACK_INSTALLlanded. 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 sixADMIN_OPS_*job types Collate queues. OpenMetadata never writes them.slackAppConfiguration.json: optionalconnectionMode(Webhook|SocketMode, defaultWebhook) andappToken(format: password). OpenMetadata stores the whole Slack app setting Fernet-encrypted, soappTokenis protected without code changes.The Collate PR that deletes the copies and stops Collate generating any OpenMetadata class follows this one.
Type of change:
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
connectionModereads asWebhook.Tests:
Use cases covered
ADMIN_OPS_*type. Before this change, mapping the row threwBackgroundJobException.connectionMode: SocketModeand itsappToken, and a setting without a mode reads asWebhook.Unit tests
JobDAOTest(6 parameterized cases),SystemRepositorySlackAppSettingTest(new, 2 cases)JobDAOTest20/20,SystemRepositorySlackAppSettingTest2/2.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
generated/jobs/backgroundJob.ts,generated/configuration/slackAppConfiguration.ts,generated/settings/settings.ts.Manual testing performed
openmetadata-specfrom this branch and regenerated Collate'scollate-serviceagainst 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:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.