Skip to content
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

[BUG] Running test with copr fails on response parsing #58

Open
Venefilyn opened this issue Jan 23, 2024 · 4 comments
Open

[BUG] Running test with copr fails on response parsing #58

Venefilyn opened this issue Jan 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Venefilyn
Copy link

Describe the bug
Running on devel branch with commit 21f8804 it fails after running the command
tesar test copr c2r -ref pr1022 -g github oamg main -p /plans/tier0/basic_sanity_checks -t al8

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

CLI Output
If applicable, please provide the CLI output to help us with debugging the issue.

❯ tesar test copr c2r -ref pr1022 -g github oamg main -p /plans/tier0/basic_sanity_checks -t al8
INFO | Getting copr build info for referenced PR1022.
INFO | LINK: https://github.com/oamg/convert2rhel/pull/1022
INFO | Getting build ID for convert2rhel version 1.6.1-1.20240108201105810920.pr1022.10.gfd6d73c.
INFO | Built at 2024-01-08 20:11:00
INFO | LINK: https://copr.fedorainfracloud.org/coprs/g/oamg/convert2rhel/build/6873352
INFO | Assigning copr build id 6873352 for testing on AlmaLinux OS 8.8.20230524 x86_64 to test batch.
INFO | Sending test plan basic_sanity_checks for copr build pr1022 for AlmaLinux OS 8.8.20230524 x86_64 to the testing farm.

Traceback (most recent call last):
  File "/home/egustavs/code/.virtualenvs/tesar-iikm-MRO/bin/tesar", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/egustavs/code/.virtualenvs/tesar-iikm-MRO/lib/python3.12/site-packages/tesar/__init__.py", line 19, in main
    sys.exit(dispatch())
             ^^^^^^^^^^
  File "/home/egustavs/code/.virtualenvs/tesar-iikm-MRO/lib/python3.12/site-packages/dispatch/__main__.py", line 138, in main
    submit_test(
  File "/home/egustavs/code/.virtualenvs/tesar-iikm-MRO/lib/python3.12/site-packages/dispatch/tf_send_request.py", line 109, in submit_test
    task_id = response.json()["id"]
              ~~~~~~~~~~~~~~~^^^^^^
KeyError: 'id'

Additional context
Add any other context about the problem here.

@Venefilyn Venefilyn added the bug Something isn't working label Jan 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Tesar board Jan 23, 2024
Copy link

Hi, there.

Thank you @SpyTec for submitting the bug report. Someone will take a look at this shortly.


This is an automated comment created by the peaceiris/actions-label-commenter. Responding to the bot or mentioning it won't have any effect.

@danmyway
Copy link
Owner

Hi @SpyTec, thank you for the report.
Sadly. I was not able to reproduce the issue on the same commit.
The only reproducer I have found is by mangling the API endpoint URL.
Which leads me to a suspicion, that the API endpoint might have been down and the request did not get posted.
I am keeping the issue open, so we can handle this case better.

@danmyway
Copy link
Owner

Additionally, when the API key is missing in the config, the traceback is the same.
@SpyTec did you have the API key set in the default ~/.config/tesar config file?

@danmyway
Copy link
Owner

Anyway, we need to check, that the API is responsive, and the API key is present in the config file.
Both should be fairly easy.
TODO @danmyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants