cooling-singapore / saas-middleware

Simulation-as-a-Service (SaaS) Middleware
MIT License
0 stars 0 forks source link

Processor listed as deployed even if Github clone failed #375

Closed HeikoAydt closed 11 months ago

HeikoAydt commented 1 year ago

Bug Description Deploying a processor requires cloning the repository that contains the processor. This may require Github credentials to access private repositories. If the keystore doesn't have credentials, the clone will fail but the processor will still be listed as deployed.

Steps To Reproduce Try to deploy processor using a repository for which the keystore used by the node doesn't have access.

Expected behaviour Deployment to fail and user to be informed accordingly.

Actual behaviour Deployment fails with exception in the log but processor still appears as deployed.

23-08-16 07:34:30.091 [INFO] [rti.adapters] [adapter:cb1c54bb6f98bc40eec160a367a084c0f6fb96704c9b3e37f4ed97780031d79d] starting up...
2023-08-16 07:34:30.401 [ERROR] [rti.adapters] [adapter:cb1c54bb6f98bc40eec160a367a084c0f6fb96704c9b3e37f4ed97780031d79d] starting up failed: [x2PCoinaurGvvyVE] Error while running command {'reason': 'non-zero return code', 'returncode': 128, 'wrapped_command': ['bash', '-c', 'cd /mnt/storage/dev/datastore-1/proc-repositories && git clone https://github.com/sec-digital-twin-lab/frs2-processors cb1c54bb6f98bc40eec160a367a084c0f6fb96704c9b3e37f4ed97780031d79d'], 'stdout': '', 'stderr': "Cloning into 'cb1c54bb6f98bc40eec160a367a084c0f6fb96704c9b3e37f4ed97780031d79d'...\nfatal: could not read Username for 'https://github.com': No such device or address\n", 'ssh_credentials': None}
2023-08-16 07:37:38.165 [WARNING] [rti.service] processor cb1c54bb6f98bc40eec160a367a084c0f6fb96704c9b3e37f4ed97780031d79d already deployed -> do no redeploy and return descriptor only
HeikoAydt commented 11 months ago

This should have been fixed by #395