Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 115 additions & 115 deletions .secrets.baseline

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions src/frontend/src/controllers/API/queries/migration/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ export type CopyStepId =
| "copy_knowledge_bases"
| "copy_files";

/** A knowledge base or a file that a copy did not make, as the command reported it. */
export interface CopyItem {
/** The name a decision about this item uses: a knowledge base's id, or a file's owner and name. */
subject: string;
kb_name?: string;
file_name?: string;
owner: string;
code: string | null;
/** The command's own words for what happened. */
reason: string | null;
}

/** The latest run of a copy step, as the record keeps it. */
export interface MigrationCopyRun {
run_id: string;
Expand All @@ -47,6 +59,10 @@ export interface MigrationCopyRun {
tables_copied?: number;
rows_copied?: number;
problems?: { code: string; message: string }[];
/** Knowledge bases and files: how many ended in each status, a test run's `would_` ones included. */
counts?: Record<string, number>;
/** The first hundred that failed. `counts.failed` says how many did. */
attention?: CopyItem[];
} | null;
/** Set when the run did not end done: the command's own code and message, or `crashed`, `cancelled` or `interrupted`. */
error: { code: string; message?: string } | null;
Expand All @@ -60,6 +76,8 @@ export interface CopyEvent {
phase?: string;
done?: number;
total?: number | null;
/** The file copy: how much it has copied so far. */
bytes?: number;
}

export type MigrationStepId =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,23 @@ export const useConfirmBackupMutation = () =>
}),
);

/** Starts a copy. It is a process of its own on the server, so it keeps going when the page is gone. */
/**
* Starts a copy, or a test run of one, which copies nothing.
* It is a process of its own on the server, so it keeps going when the page is gone.
*/
export const useStartCopyMutation = (step: CopyStepId) => {
const client = useQueryClient();
return useMutation<unknown, AxiosError<{ detail?: MigrationError }>, void>({
mutationFn: () =>
api.post(getURL("MIGRATION", { path: `steps/${step}/runs` }), {
dry_run: false,
}),
// The record now says the run is on, or what changed for the server to refuse it.
onSettled: () => client.invalidateQueries({ queryKey: migrationKeys.all }),
});
return useMutation<unknown, AxiosError<{ detail?: MigrationError }>, boolean>(
{
mutationFn: (dryRun) =>
api.post(getURL("MIGRATION", { path: `steps/${step}/runs` }), {
dry_run: dryRun,
}),
// The record now says the run is on, or what changed for the server to refuse it.
onSettled: () =>
client.invalidateQueries({ queryKey: migrationKeys.all }),
},
);
};

/** Stops a run. The page learns that it ended from the run's own events. */
Expand Down
23 changes: 23 additions & 0 deletions src/frontend/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,29 @@
"settings.migration.error.dbCountMismatch": "Die Datenbank der neuen Instanz enthält eine frühere Kopie, die nicht mehr zu dieser Instanz passt. Erneutes Kopieren in diese Datenbank behebt das nicht. Speichern Sie unter „{{step}}“ eine neue, leere Datenbank und kopieren Sie erneut.",
"settings.migration.error.orphansNoRule": "Einige Zeilen verweisen auf gelöschte Elemente und lassen sich nicht sicher auslassen. Laden Sie das Migrationsprotokoll herunter und wenden Sie sich an den Support.",
"settings.migration.error.valueRejected": "Einige Werte lassen sich nicht in PostgreSQL speichern. Laden Sie das Migrationsprotokoll herunter und wenden Sie sich an den Support.",
"settings.migration.copy.body": "Ein Testlauf zeigt, was kopiert würde, und kopiert nichts. Erneutes Kopieren überspringt, was schon vorhanden ist.",
"settings.migration.copy.testRun": "Testlauf",
"settings.migration.copy.stopBody": "Was bisher kopiert wurde, bleibt erhalten. Kopieren Sie erneut, um den Rest zu kopieren.",
"settings.migration.copy.counts": "Kopiert: {{copied}}. Bereits kopiert: {{skipped}}. Nicht kopiert: {{failed}}.",
"settings.migration.copy.testCounts": "Testlauf: Es wurde nichts kopiert. Zu kopieren: {{copied}}. Bereits kopiert: {{skipped}}. Nicht kopierbar: {{failed}}.",
"settings.migration.copy.done": "Kopiert: {{done}} von {{total}}",
"settings.migration.copy.attention": "Einige wurden nicht kopiert. Bei jedem steht unten der Grund.",
"settings.migration.copy.attentionMore": "Angezeigt werden die ersten {{shown}} von {{count}}.",
"settings.migration.kb.progress": "Einträge: {{done}} von {{total}}",
"settings.migration.kb.postgresNote": "Diese Instanz verwendet PostgreSQL und wechselt daher ebenfalls zum neuen Speicher. Das Wiederherstellen der Sicherung macht das rückgängig.",
"settings.migration.kb.ranking.body": "Die neue Instanz sortiert die Suchergebnisse dieser Wissensdatenbank anders.",
"settings.migration.files.progress": "Dateien: {{done}} von {{total}}. Bisher kopiert: {{bytes}}.",
"settings.migration.files.conflict": "Der Bucket enthält bereits eine andere Datei mit diesem Namen. Es wird nichts überschrieben.",
"settings.migration.files.badName": "Der gespeicherte Name dieser Datei enthält einen Backslash oder „..“, den der Dateispeicher von Langflow ablehnt. Deshalb kann sie nicht kopiert werden.",
"settings.migration.files.noFile": "Zu diesem Namen ist nichts gespeichert, es gibt also nichts zu kopieren. Die Datei wird als fehlend angezeigt.",
"settings.migration.error.bucket": "In den Bucket kann nicht geschrieben werden. Prüfen Sie „{{step}}“ und versuchen Sie es erneut.",
"settings.migration.error.notCopied": "Wurde nicht kopiert.",
"settings.migration.error.kbIngesting": "Es werden noch Inhalte hinzugefügt.",
"settings.migration.error.kbShort": "Enthält weniger Inhalte als verzeichnet.",
"settings.migration.error.kbTargetMore": "Die neue Instanz enthält dafür bereits mehr Inhalte.",
"settings.migration.error.kbChanged": "Wurde während des Kopierens geändert. Kopieren Sie erneut.",
"settings.migration.error.kbBackend": "Verwendet einen Speicher, den diese Version nicht öffnen kann.",
"settings.migration.error.kbUpgrade": "Diese Version kann den Speicher in seinem jetzigen Zustand nicht lesen. Unter „Details“ steht, warum.",
"settings.nav.modelProviders": "Modellanbieter",
"settings.nav.shortcuts": "Tastenkürzel",
"settings.nav.store": "Langflow-Shop",
Expand Down
23 changes: 23 additions & 0 deletions src/frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,29 @@
"settings.migration.error.dbCountMismatch": "The new instance's database holds an earlier copy that no longer matches this instance. Copying into it again can't fix that. Save a new, empty database in '{{step}}', then copy again.",
"settings.migration.error.orphansNoRule": "Some rows point at deleted items and can't be left out safely. Download the migration record and contact support.",
"settings.migration.error.valueRejected": "Some values can't be stored in PostgreSQL. Download the migration record and contact support.",
"settings.migration.copy.body": "A test run says what would be copied and copies nothing. Copying again skips what is already there.",
"settings.migration.copy.testRun": "Test run",
"settings.migration.copy.stopBody": "What was copied so far stays where it is. Copy again to finish.",
"settings.migration.copy.counts": "Copied: {{copied}}. Already copied: {{skipped}}. Not copied: {{failed}}.",
"settings.migration.copy.testCounts": "Test run: nothing was copied. To copy: {{copied}}. Already copied: {{skipped}}. Can't be copied: {{failed}}.",
"settings.migration.copy.done": "Copied: {{done}} of {{total}}",
"settings.migration.copy.attention": "Some were not copied. Each one below says why.",
"settings.migration.copy.attentionMore": "Showing the first {{shown}} of {{count}}.",
"settings.migration.kb.progress": "Entries: {{done}} of {{total}}",
"settings.migration.kb.postgresNote": "This instance uses PostgreSQL, so it switches to the new store too. Restoring the backup undoes it.",
"settings.migration.kb.ranking.body": "The new instance ranks search results a different way for this one.",
"settings.migration.files.progress": "Files: {{done}} of {{total}}. Copied so far: {{bytes}}.",
"settings.migration.files.conflict": "The bucket already holds a different file with this name. Nothing is overwritten.",
"settings.migration.files.badName": "This file's stored name has a backslash or \"..\" in it, which Langflow's file storage refuses, so it can't be copied.",
"settings.migration.files.noFile": "Nothing is stored for this name, so there is nothing to copy. It will show as missing.",
"settings.migration.error.bucket": "Can't write to the bucket. Check '{{step}}', then try again.",
"settings.migration.error.notCopied": "It wasn't copied.",
"settings.migration.error.kbIngesting": "It is still adding content.",
"settings.migration.error.kbShort": "It holds less content than recorded.",
"settings.migration.error.kbTargetMore": "The new instance already holds more content for it.",
"settings.migration.error.kbChanged": "It changed while copying. Copy again.",
"settings.migration.error.kbBackend": "It uses a store this version can't open.",
"settings.migration.error.kbUpgrade": "This version can't read its storage as it is now. Details says why.",
"messages.title": "Messages",
"messages.loadOlder": "Load older messages",
"messages.loadError": "Could not load messages.",
Expand Down
23 changes: 23 additions & 0 deletions src/frontend/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,29 @@
"settings.migration.error.dbCountMismatch": "La base de datos de la nueva instancia contiene una copia anterior que ya no coincide con esta instancia. Copiar de nuevo en ella no lo arregla. Guarda una base de datos nueva y vacía en '{{step}}' y copia de nuevo.",
"settings.migration.error.orphansNoRule": "Algunas filas apuntan a elementos eliminados y no se pueden omitir con seguridad. Descarga el registro de migración y contacta con soporte.",
"settings.migration.error.valueRejected": "Algunos valores no se pueden guardar en PostgreSQL. Descarga el registro de migración y contacta con soporte.",
"settings.migration.copy.body": "Una prueba indica qué se copiaría y no copia nada. Al copiar de nuevo se omite lo que ya está.",
"settings.migration.copy.testRun": "Prueba",
"settings.migration.copy.stopBody": "Lo copiado hasta ahora se queda donde está. Copia de nuevo para terminar.",
"settings.migration.copy.counts": "Copiados: {{copied}}. Ya copiados: {{skipped}}. Sin copiar: {{failed}}.",
"settings.migration.copy.testCounts": "Prueba: no se ha copiado nada. Por copiar: {{copied}}. Ya copiados: {{skipped}}. No se pueden copiar: {{failed}}.",
"settings.migration.copy.done": "Copiados: {{done}} de {{total}}",
"settings.migration.copy.attention": "Algunos no se han copiado. Cada uno indica el motivo más abajo.",
"settings.migration.copy.attentionMore": "Se muestran los primeros {{shown}} de {{count}}.",
"settings.migration.kb.progress": "Entradas: {{done}} de {{total}}",
"settings.migration.kb.postgresNote": "Esta instancia usa PostgreSQL, así que también pasa al nuevo almacén. Restaurar la copia de seguridad lo deshace.",
"settings.migration.kb.ranking.body": "La nueva instancia ordena los resultados de búsqueda de otra forma en esta.",
"settings.migration.files.progress": "Archivos: {{done}} de {{total}}. Copiado hasta ahora: {{bytes}}.",
"settings.migration.files.conflict": "El bucket ya contiene un archivo distinto con este nombre. No se sobrescribe nada.",
"settings.migration.files.badName": "El nombre guardado de este archivo contiene una barra invertida o \"..\", que el almacenamiento de archivos de Langflow rechaza, así que no se puede copiar.",
"settings.migration.files.noFile": "No hay nada guardado con este nombre, así que no hay nada que copiar. Aparecerá como ausente.",
"settings.migration.error.bucket": "No se puede escribir en el bucket. Revisa '{{step}}' y vuelve a intentarlo.",
"settings.migration.error.notCopied": "No se ha copiado.",
"settings.migration.error.kbIngesting": "Todavía está añadiendo contenido.",
"settings.migration.error.kbShort": "Contiene menos contenido del registrado.",
"settings.migration.error.kbTargetMore": "La nueva instancia ya contiene más contenido de esta.",
"settings.migration.error.kbChanged": "Cambió durante la copia. Copia de nuevo.",
"settings.migration.error.kbBackend": "Usa un almacén que esta versión no puede abrir.",
"settings.migration.error.kbUpgrade": "Esta versión no puede leer su almacenamiento tal como está ahora. En 'Detalles' se explica por qué.",
"settings.nav.modelProviders": "Proveedores de modelos",
"settings.nav.shortcuts": "Atajos",
"settings.nav.store": "Tienda Langflow",
Expand Down
23 changes: 23 additions & 0 deletions src/frontend/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,29 @@
"settings.migration.error.dbCountMismatch": "La base de données de la nouvelle instance contient une copie antérieure qui ne correspond plus à cette instance. Copier de nouveau dans cette base ne corrige rien. Enregistrez une base de données neuve et vide dans « {{step}} », puis copiez à nouveau.",
"settings.migration.error.orphansNoRule": "Certaines lignes renvoient à des éléments supprimés et ne peuvent pas être écartées sans risque. Téléchargez le journal de migration et contactez l'assistance.",
"settings.migration.error.valueRejected": "Certaines valeurs ne peuvent pas être stockées dans PostgreSQL. Téléchargez le journal de migration et contactez l'assistance.",
"settings.migration.copy.body": "Un essai indique ce qui serait copié et ne copie rien. Une nouvelle copie ignore ce qui est déjà en place.",
"settings.migration.copy.testRun": "Essai",
"settings.migration.copy.stopBody": "Ce qui a déjà été copié reste en place. Copiez à nouveau pour terminer.",
"settings.migration.copy.counts": "Copiés : {{copied}}. Déjà copiés : {{skipped}}. Non copiés : {{failed}}.",
"settings.migration.copy.testCounts": "Essai : rien n'a été copié. À copier : {{copied}}. Déjà copiés : {{skipped}}. Impossibles à copier : {{failed}}.",
"settings.migration.copy.done": "Copiés : {{done}} sur {{total}}",
"settings.migration.copy.attention": "Certains n'ont pas été copiés. Chacun indique pourquoi ci-dessous.",
"settings.migration.copy.attentionMore": "Affichage des {{shown}} premiers sur {{count}}.",
"settings.migration.kb.progress": "Entrées : {{done}} sur {{total}}",
"settings.migration.kb.postgresNote": "Cette instance utilise PostgreSQL : elle passe donc elle aussi au nouveau stockage. La restauration de la sauvegarde annule ce changement.",
"settings.migration.kb.ranking.body": "La nouvelle instance classe différemment les résultats de recherche de celle-ci.",
"settings.migration.files.progress": "Fichiers : {{done}} sur {{total}}. Déjà copié : {{bytes}}.",
"settings.migration.files.conflict": "Le bucket contient déjà un autre fichier portant ce nom. Rien n'est écrasé.",
"settings.migration.files.badName": "Le nom enregistré de ce fichier contient une barre oblique inverse ou « .. », que le stockage de fichiers de Langflow refuse : il ne peut donc pas être copié.",
"settings.migration.files.noFile": "Rien n'est stocké sous ce nom : il n'y a donc rien à copier. Il apparaîtra comme manquant.",
"settings.migration.error.bucket": "Impossible d'écrire dans le bucket. Vérifiez « {{step}} », puis réessayez.",
"settings.migration.error.notCopied": "Non copié.",
"settings.migration.error.kbIngesting": "Du contenu est encore en cours d'ajout.",
"settings.migration.error.kbShort": "Elle contient moins de contenu que ce qui est enregistré.",
"settings.migration.error.kbTargetMore": "La nouvelle instance contient déjà plus de contenu pour celle-ci.",
"settings.migration.error.kbChanged": "Elle a changé pendant la copie. Copiez à nouveau.",
"settings.migration.error.kbBackend": "Elle utilise un stockage que cette version ne peut pas ouvrir.",
"settings.migration.error.kbUpgrade": "Cette version ne peut pas lire son stockage dans son état actuel. « Détails » explique pourquoi.",
"settings.nav.modelProviders": "Fournisseurs de modèles",
"settings.nav.shortcuts": "Raccourcis",
"settings.nav.store": "Boutique Langflow",
Expand Down
Loading
Loading