Skip to content

Several issues with setting machine info #944

@thomasaarholt

Description

@thomasaarholt

I've been setting up / debugging a github action to run a benchmark on a repo, and then push the html and results to a separate repo. Since the github action runs on a fresh server instance each time, the following may be related to that:

  1. Calling asv machine --name test results in the following response when ~/.asv-machine.json does not exist. The hostname in this case is smnpc-fp58, and this happens both in PowerShell and bash. The file is created with the correct machine name. The same response occurs if I specify all other options as well.
 $ asv machine --machine test
· No information stored about machine 'smnpc-fp58'. I know about nothing.
  1. Calling asv machine --"specifying all options and setting --machine hostname results in the following error and no file generated, when ~/.asv-machine.json does not exist.
$ asv machine --machine smnpc-fp58 --os test --arch test --cpu test --num_cpu 1 --ram '1GB'

· No information stored about machine 'smnpc-fp58'. I know about nothing.


Traceback (most recent call last):
  File "c:\users\thomasaar\.conda\envs\py7\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\thomasaar\.conda\envs\py7\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\thomasaar\.conda\envs\py7\Scripts\asv.exe\__main__.py", line 7, in <module>
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\main.py", line 38, in main
    result = args.func(args)
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\commands\__init__.py", line 49, in run_from_args
    return cls.run_from_conf_args(conf, args)
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\commands\machine.py", line 40, in run_from_conf_args
    return cls.run(**vars(args))
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\commands\machine.py", line 54, in run
    use_defaults=use_defaults, **different)
  File "c:\users\thomasaar\.conda\envs\py7\lib\site-packages\asv\machine.py", line 205, in load
    machine_name = d['machine']
KeyError: 'machine'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions