{"record":{"id":"c2af7b78f90b239f","repo":"hasura/graphql-engine","slug":"getting-list-of-seed-files-to-move-w","errorCode":null,"errorMessage":"getting list of seed files to move: %w","messagePattern":"getting list of seed files to move: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/internal/scripts/update-project-v3.go","lineNumber":167,"sourceCode":"\t\topts.EC.Logger.Debug(\"completed: copying state from hdb_catalog.schema_migrations\")\n\t}\n\n\topts.EC.Logger.Debug(\"start: copy old migrations to new directory structure\")\n\topts.EC.Spin(\"Moving migrations and seeds to new directories \")\n\t// move migration child directories\n\t// get directory names to move\n\tmigrationDirectoriesToMove, err := getMigrationDirectoryNames(\n\t\topts.Fs,\n\t\topts.MigrationsAbsDirectoryPath,\n\t)\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"getting list of migrations to move: %w\", err))\n\t}\n\t// move seed child directories\n\t// get directory names to move\n\tseedFilesToMove, err := getSeedFiles(opts.Fs, opts.SeedsAbsDirectoryPath)\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"getting list of seed files to move: %w\", err))\n\t}\n\n\t// create a new directory for TargetDatabase\n\ttargetMigrationsDirectoryName := filepath.Join(opts.MigrationsAbsDirectoryPath, targetDatabase)\n\tif err = opts.Fs.Mkdir(targetMigrationsDirectoryName, 0o755); err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"creating target migrations directory: %w\", err))\n\t}\n\n\t// create a new directory for TargetDatabase\n\ttargetSeedsDirectoryName := filepath.Join(opts.SeedsAbsDirectoryPath, targetDatabase)\n\tif err = opts.Fs.Mkdir(targetSeedsDirectoryName, 0o755); err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"creating target seeds directory: %w\", err))\n\t}\n\n\t// move migration directories to target database directory\n\tif err := copyMigrations(\n\t\topts.Fs,\n\t\tmigrationDirectoriesToMove,","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/internal/scripts/update-project-v3.go#L149-L185","documentation":"Thrown by scripts.UpdateProjectV3 when getSeedFiles fails while listing seed files under the seeds directory that must be moved to the per-database V3 layout. The %w wraps the underlying filesystem error from reading the seeds directory.","triggerScenarios":"Running update-project-v3 when the seeds directory path configured in config.yaml doesn't exist, isn't a directory, or is unreadable by the process.","commonSituations":"config.yaml's seeds_dir pointing at a custom path that was renamed/deleted, permissions problems, or running the command outside the project root.","solutions":["Check the seeds_dir setting in config.yaml and ensure that directory exists (or remove the setting to use the default seeds/)","Create the directory if it's missing (mkdir -p seeds)","Fix permissions or run from the correct project root"],"exampleFix":"# config.yaml\n# before:\nseeds_dir: custom-seeds   # directory deleted\n\n# after:\nseeds_dir: seeds           # mkdir seeds first, or point to existing dir","handlingStrategy":"validation","validationCode":"seedsDir := \"seeds\" // or read seeds_dir from config\nif info, err := os.Stat(seedsDir); err != nil {\n\tif os.IsNotExist(err) {\n\t\tif mkErr := os.MkdirAll(seedsDir, 0o755); mkErr != nil {\n\t\t\treturn mkErr\n\t\t}\n\t} else {\n\t\treturn err\n\t}\n} else if !info.IsDir() {\n\treturn fmt.Errorf(\"%s is not a directory\", seedsDir)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep seeds_dir in config.yaml pointing at an existing directory","Create seeds/ in the repo (even empty) before running upgrade scripts"],"tags":["go","filesystem","seeds","upgrade","hasura-cli"],"backgroundTag":"seeds-directory-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}