A table on a backend module with no query interface (a storage-only module such as qbit-edi's edi_preview_download) was classified DATA, read by the keyset pager, and failed the whole run with "IllegalStateException: Query is not implemented in this module". TableRoles.isQueryable() now resolves the module through QBackendModuleDispatcher (cached per backend type) and such tables are EXTERNAL and always excluded by ScopeResolver with reason NOT_QUERYABLE, even when selected by name or role. The Run backup review lists them, and no per-table export process is offered for them. Failed runs now persist "Backup failed: Class: message" in error_message and the class, cause chain and top root-cause frames (bounded to 8 KB) in error_detail, both sanitized by the new FailureText (URL user-info, presigned query parameters, key=value secrets, Authorization/Bearer values, AWS access key ids, PEM blocks and Postgres row values are redacted; object keys and bucket names are kept). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.6 KiB
Java
41 lines
1.6 KiB
Java
/*
|
|
* Copyright 2026 Kingsrook, LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package com.kingsrook.qbits.backups.scope;
|
|
|
|
|
|
/*******************************************************************************
|
|
** What a table is for, as far as backups are concerned (spec 3.2). Plans select
|
|
** tables by role.
|
|
*******************************************************************************/
|
|
public enum TableRole
|
|
{
|
|
/** Business data (included by default). */
|
|
DATA,
|
|
/** Audit tables (included by default, configurable). */
|
|
AUDIT,
|
|
/** Rebuildable from other data: search indexes, rollups, caches. Excluded by default. */
|
|
DERIVED,
|
|
/** Sessions, idempotency keys, scheduler internals. Excluded by default. */
|
|
EPHEMERAL,
|
|
/** Tokens, salts, credentials. NEVER backed up, even when selected explicitly. */
|
|
SECRET,
|
|
/** The tables of this qbit: the catalog is rebuilt from manifests. */
|
|
BACKUPS,
|
|
/** Tables backed by another system (API), or by a backend that cannot be queried (storage-only: never read, even when selected). Excluded by default. */
|
|
EXTERNAL
|
|
}
|