CLIP-HPC / goslmailer

GoSlurmMailer - drop in replacement for default slurm MailProg. Delivers slurm job messages to various destinations.
40 stars 6 forks source link

Trouble running end to end tests #24

Closed cecilialau6776 closed 1 year ago

cecilialau6776 commented 1 year ago

I'm working on writing a connector for Slack. The readme says that the prerequisites for doing end-to-end tests requires me to be able to successfully run ssh $USER@localhost without needing a password, which I can do. However, running make test_endly (or make) results in this error:

## test_01
---

1. run gosler, save to gob
2. run gobler, render gob to file

---
[run[loop_over_tests01] run_loop_over_tests_casestest_01                                                        tag.id]
[run[loop_over_tests01]                                                                                   workflow.run]
[run[loop_over_tests01] Current test                                                                    workflow.print]
Running test 01 from cases/test_01
[run[loop_over_tests01]run|[deploy_conf_files]                                                            storage.copy]
[run[loop_over_tests01]run|[deploy_conf_files]storage.copy                                                        Copy]
compress: false, expand: false
SourceURL: file:///work/goslmailer/test_e2e/cases/test_01/conf
DestURL: file:///tmp
[run[loop_over_tests01]run|[deploy_sacct_files]                                                           storage.copy]
compress: false, expand: false
SourceURL: file:///work/goslmailer/test_e2e/cases/test_01/sacct
DestURL: file:///tmp
[run[loop_over_tests01]run|[run_goslmailer]                                                                   exec.run]
[run[loop_over_tests01]run|[run_goslmailer]exec.run                                                              error]
failed to dial localhost:22: %!s(MISSING): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain at exec.run 
[run[loop_over_tests01]run                                                                                       error]
run_goslmailer: failed to dial localhost:22: %!s(MISSING): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain at exec.run  at workflow.run 
run_loop_over_tests_casestest_01: run_goslmailer: failed to dial localhost:22: %!s(MISSING): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain at exec.run  at workflow.run 
[STATUS: FAILED                                                                                         elapsed: 48 ms]
make: *** [Makefile:83: test_endly] Error 1

I see the same thing happen when I try to run the build on github actions: https://github.com/cecilialau6776/goslmailer/actions/runs/3953335266/jobs/6769495122#step:8:41

Any help would be appreciated!

pja237 commented 1 year ago

Ok, i've approved the build on PR for the #25 and i see the error message. My guess would be that ubuntu-latest on which the build runs https://github.com/CLIP-HPC/goslmailer/blob/f8118e6997edf6f5da11a7dc554890e15501f642/.github/workflows/build_on_pr.yml#L10-L11

has deprecated rsa key auth https://github.com/CLIP-HPC/goslmailer/blob/f8118e6997edf6f5da11a7dc554890e15501f642/.github/workflows/build_on_pr.yml#L26

This came from endly framework README: https://github.com/viant/endly/blob/1da117e16e9df34c5abc4e5ac2d52ceb6522e882/doc/secrets/README.md?plain=1#L19-L36

, so perhaps if you have time, you could check if some other key algorithm would work?

cecilialau6776 commented 1 year ago

I tried using ed25519 (https://github.com/cecilialau6776/goslmailer/actions/runs/3998886923/jobs/6862090994), but this gives me a different error I wasn't able to debug.

pja237 commented 1 year ago

So, two things that i've changed to fix this:

  1. rsa-> ed25519 key-pair
  2. this is the one that caused the error later (needed now in ubuntu-latest image, without it, terminal returns lots of garbage codes back, which breaks the parser and makes PATHs look empty to endly) https://github.com/CLIP-HPC/goslmailer/blob/788b19b5ff7e7aa5cb9f6d6b7f2484f911764848/.github/workflows/build_on_pr.yml#L28

Now e2e tests work on ubuntu-latest image, also if you're running ubuntu 22 locally, add this line to .inputrc to make it good.