mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-26 18:35:38 +08:00
feat(pipeline-migration): relax legacy config migration and pin latest runner plugins
- Coerce/default/drop invalid or unknown legacy fields with warnings instead of blocking - Never block on LocalAgent model; prune dangling KB/tool/MCP references - Mark custom (non-builtin) 4.10 runners as unsupported_runner instead of failing - Pin runner plugins to current marketplace versions (0.2.x); fall back to latest when a pin is withdrawn - Raise plugin install/upgrade timeout to 600s for slow dependency installs - Assistant configure_pipeline writes the 4.11 runner shape Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -147,7 +147,15 @@ export default function PipelineMigration({
|
||||
['migrated', 'already_current'].includes(item.state),
|
||||
);
|
||||
const rows = preview?.items ?? [];
|
||||
// Custom 4.10 runners cannot be migrated automatically; they are listed
|
||||
// for attention but never submitted.
|
||||
const count = rows.filter(
|
||||
(item) =>
|
||||
!['already_current', 'not_legacy', 'unsupported_runner'].includes(
|
||||
item.state,
|
||||
),
|
||||
).length;
|
||||
const attention = rows.filter(
|
||||
(item) => !['already_current', 'not_legacy'].includes(item.state),
|
||||
).length;
|
||||
|
||||
@@ -189,7 +197,10 @@ export default function PipelineMigration({
|
||||
)
|
||||
return;
|
||||
let items = rows.filter(
|
||||
(item) => !['already_current', 'not_legacy'].includes(item.state),
|
||||
(item) =>
|
||||
!['already_current', 'not_legacy', 'unsupported_runner'].includes(
|
||||
item.state,
|
||||
),
|
||||
);
|
||||
setInstallations([]);
|
||||
setDataOnly(!installPlugins);
|
||||
@@ -340,12 +351,12 @@ export default function PipelineMigration({
|
||||
|
||||
return (
|
||||
<>
|
||||
{(count > 0 || results.length > 0) && (
|
||||
{(attention > 0 || results.length > 0) && (
|
||||
<Alert className="mb-4 shrink-0 border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200">
|
||||
<AlertTriangle aria-hidden="true" />
|
||||
<AlertTitle>{t('pipelineMigration.title')}</AlertTitle>
|
||||
<AlertDescription className="flex items-center justify-between gap-3 text-amber-800 dark:text-amber-200">
|
||||
<span>{t('pipelineMigration.detected', { count })}</span>
|
||||
<span>{t('pipelineMigration.detected', { count: attention })}</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@@ -404,7 +415,7 @@ export default function PipelineMigration({
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{t('pipelineMigration.detected', { count })}
|
||||
{t('pipelineMigration.detected', { count: attention })}
|
||||
</p>
|
||||
)}
|
||||
<MigrationInstallProgress installations={installations} />
|
||||
@@ -417,7 +428,7 @@ export default function PipelineMigration({
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
{(count > 0 || results.length > 0) && (
|
||||
{(attention > 0 || results.length > 0) && (
|
||||
<Collapsible>
|
||||
<CollapsibleTrigger asChild>
|
||||
<Button
|
||||
@@ -470,6 +481,11 @@ export default function PipelineMigration({
|
||||
{item.target_plugin.name}
|
||||
</p>
|
||||
)}
|
||||
{item.state === 'unsupported_runner' && (
|
||||
<p className="text-xs text-destructive break-words">
|
||||
{t('pipelineMigration.notices.customRunner')}
|
||||
</p>
|
||||
)}
|
||||
{item.warnings.some(
|
||||
(issue) =>
|
||||
issue.code === 'local.box_state_reset',
|
||||
|
||||
@@ -31,6 +31,21 @@ const issueKeys: Record<string, string> = {
|
||||
runner_schema_incompatible: 'schemaChanged',
|
||||
plugin_version_incompatible: 'pluginVersion',
|
||||
'runtime.pending_interaction': 'pendingInteraction',
|
||||
'legacy.custom_runner_unsupported': 'customRunner',
|
||||
'migration.unknown_field_dropped': 'fieldDropped',
|
||||
'migration.unknown_section_archived': 'fieldDropped',
|
||||
'migration.value_coerced': 'valueRepaired',
|
||||
'migration.invalid_value_defaulted': 'valueRepaired',
|
||||
'migration.missing_default_filled': 'valueRepaired',
|
||||
'migration.alias_conflict_resolved': 'aliasRepaired',
|
||||
'local.prompt_normalized': 'valueRepaired',
|
||||
'local.reasoning_dropped': 'valueRepaired',
|
||||
'local.box_template_defaulted': 'valueRepaired',
|
||||
'langflow.tweaks_invalid_defaulted': 'valueRepaired',
|
||||
'migration.mixed_runner_selection': 'mixedRunner',
|
||||
'migration.runner_config_replaced': 'runnerConfigReplaced',
|
||||
'extensions.runner_added': 'runnerAdded',
|
||||
invalid_extension_preferences: 'extensionPrefs',
|
||||
};
|
||||
|
||||
/** Only locally reviewed codes may select localized copy. */
|
||||
|
||||
@@ -4,6 +4,7 @@ export type PipelineMigrationState =
|
||||
| 'blocked'
|
||||
| 'already_current'
|
||||
| 'not_legacy'
|
||||
| 'unsupported_runner'
|
||||
| 'activation_pending';
|
||||
|
||||
export interface PipelineMigrationIssue {
|
||||
|
||||
Reference in New Issue
Block a user