-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catalogue check fails immediately after creation via ImportTableInfo #1834
Comments
@JFriel I've updated the steps above to more easily reproduce the error. The actual error turns out to be |
@rkm Congratulations on finding a 7year old issue 🎉 Have a fix going through the review process now. |
Just an update to say that I've tested with v8.1.6 and it gives a slightly different error message: ...
2024-06-15 19:39:02.8271 TRACE Running Command 'ExecuteCommandImportTableInfo' .
2024-06-15 19:39:02.9488 ERROR Error executing script. Problem line was 'ImportTableInfo "Table:IO_StudyTable:Schema:dicom:DatabaseType:PostgreSql:Server=localhost;Uid=postgres;Database=smi" True':**Could not find any columns in table IO_StudyTable .**
2024-06-15 19:39:02.9488 INFO Fatal error occurred so returning -1 . System.Exception: Error executing script. Problem line was 'ImportTableInfo "Table:IO_StudyTable:Schema:dicom:DatabaseType:PostgreSql:Server=localhost;Uid=postgres;Database=smi" True':Could not find any columns in table IO_StudyTable
---> System.Exception: Could not find any columns in table IO_StudyTable
at FAnsi.Implementations.PostgreSql.PostgreSqlTableHelper.DiscoverColumns(DiscoveredTable discoveredTable, IManagedConnection connection, String database)
at FAnsi.Discovery.DiscoveredTable.DiscoverColumns(IManagedTransaction managedTransaction) at Rdmp.Core.Curation.TableInfoImporter.DoImport(ITableInfo& tableInfoCreated, ColumnInfo[]& columnInfosCreated) in D:\a\RDMP\RDMP\Rdmp.Core\Curation\TableInfoImporter.cs:line 137
at Rdmp.Core.CommandExecution.AtomicCommands.ExecuteCommandImportTableInfo.Execute() in D:\a\RDMP\RDMP\Rdmp.Core\CommandExecution\AtomicCommands\ExecuteCommandImportTableInfo.cs:line 57
at Rdmp.Core.CommandExecution.CommandInvoker.ExecuteCommand(ConstructorInfo constructorInfo, CommandLineObjectPicker picker) in D:\a\RDMP\RDMP\Rdmp.Core\CommandExecution\CommandInvoker.cs:line 298
at Rdmp.Core.CommandLine.Runners.ExecuteCommandRunner.RunCommand(String command) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\Runners\ExecuteCommandRunner.cs:line 104
at Rdmp.Core.CommandLine.Runners.ExecuteCommandRunner.RunScript(RdmpScript script, IRDMPPlatformRepositoryServiceLocator repositoryLocator) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\Runners\ExecuteCommandRunner.cs:line 199
--- End of inner exception stack trace ---
at Rdmp.Core.CommandLine.Runners.ExecuteCommandRunner.RunScript(RdmpScript script, IRDMPPlatformRepositoryServiceLocator repositoryLocator) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\Runners\ExecuteCommandRunner.cs:line 204 at Rdmp.Core.CommandLine.Runners.ExecuteCommandRunner.Run(IRDMPPlatformRepositoryServiceLocator repositoryLocator, IDataLoadEventListener listener, ICheckNotifier checkNotifier, GracefulCancellationToken token) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\Runners\ExecuteCommandRunner.cs:line 90
at Rdmp.Core.CommandLine.RdmpCommandLineBootStrapper.Run(RDMPCommandLineOptions opts, IRunner explicitRunner, IRDMPPlatformRepositoryServiceLocator existingLocator) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\RdmpCommandLineBootStrapper.cs:line 145
at Rdmp.Core.Program.HandleArguments(String[] args, Logger logger) in D:\a\RDMP\RDMP\Tools\rdmp\Program.cs:line 83 |
Testing on the latest develop commit |
@rkm the fix is currently in the 'release/8.1.7' branch, but will re-test with the updated error message you received in v8.1.6 |
Looks like this is still broken (with |
Actually, my bad. This works fully now on the A full reproduction: postgres_id=$(docker run --rm -d -p5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:14)
docker exec -it $postgres_id psql -U postgres -c 'CREATE DATABASE rdmp_logging;'
docker exec -it $postgres_id psql -U postgres -c 'CREATE DATABASE smi;'
docker exec -it $postgres_id psql -U postgres --db smi -c 'CREATE SCHEMA dicom; CREATE TABLE dicom."IO_StudyTable" ("StudyInstanceUID" varchar(255)); INSERT INTO dicom."IO_StudyTable" VALUES ('"'"'1.2.3'"'"');'
rm -rf yaml
../../HicServices/RDMP/Tools/rdmp/bin/Debug/net8.0/rdmp -- -f /dev/stdin --dir yaml <<EOF
Commands:
- CreateNewExternalDatabaseServer LiveLoggingServer_ID "DatabaseType:PostgreSql:Server=127.0.0.1;Uid=postgres;Database=postgres"
- CreateNewExternalDatabaseServer None "DatabaseType:PostgreSql:Server=localhost;Uid=postgres;Database=smi"
- ImportTableInfo "Table:IO_StudyTable:Schema:dicom:DatabaseType:PostgreSql:Server=localhost;Uid=postgres;Database=smi" True
# IDs may need adjusted
- Check TableInfo:3
- Check Catalogue:6
EOF |
Describe the bug
After running ImportTableInfo with
true
to create a corresponding catalogue, running Check results in an error as the wrong database is being specified.To Reproduce
Expected behavior
All checks pass.
RDMP Version
Error with Stack Trace
Database Engine
Postgres.
Additional context
N/A
The text was updated successfully, but these errors were encountered: