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

Missing 1 required positional argument: 'args' #544

Open
RomainMuller opened this issue Oct 24, 2024 · 0 comments
Open

Missing 1 required positional argument: 'args' #544

RomainMuller opened this issue Oct 24, 2024 · 0 comments
Assignees
Labels
Area: Report Upload Issues with pre-ingest report uploading bug Something isn't working high High Priority Issues (to be fixed within 2 sprints) Test Analytics Test Analytics

Comments

@RomainMuller
Copy link

I am seeing failures on 0.8.0 when trying to run codecovcli create-report-results:

debug - 2024-10-24 09:38:09,453 -- Using ci service from provider name: GithubActions
  debug - 2024-10-24 09:38:09,456 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
  debug - 2024-10-24 09:38:09,458 -- versioning system found: <class 'codecov_cli.helpers.versioning_systems.GitVersioningSystem'>
  debug - 2024-10-24 09:38:09,461 -- Loading config from /home/runner/work/orchestrion/orchestrion/codecov.yml
  debug - 2024-10-24 09:38:09,466 -- Creating report results --- {"auto_load_params_from": "GithubActions", "verbose": true, "codecov_yml_path": null, "enterprise_url": null, "version": "cli-0.8.0", "command": "create-report-results", "commit_sha": "cec[48](https://github.com/DataDog/orchestrion/actions/runs/11495397264/job/31998711406?pr=353#step:4:49)201fa756423589e768c1561fe5661b9f103", "fail_on_error": true, "git_service": "github", "slug": "DataDog/orchestrion", "code": "default"}
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.12.7/x64/bin/codecovcli", line 8, in <module>
      sys.exit(run())
               ^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/codecov_cli/main.py", line 83, in run
      cli(obj={})
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
      return self.main(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/click/core.py", line 1078, in main
      rv = self.invoke(ctx)
           ^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
      return ctx.invoke(self.callback, **ctx.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/click/core.py", line 783, in invoke
      return __callback(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x[64](https://github.com/DataDog/orchestrion/actions/runs/11495397264/job/31998711406?pr=353#step:4:65)/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
      return f(get_current_context(), *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/codecov_cli/commands/create_report_result.py", line 36, in create_report_results
      create_report_results_logic(
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/codecov_cli/services/report/__init__.py", line 79, in create_report_results_logic
      sending_result = send_reports_result_request(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  TypeError: send_reports_result_request() missing 1 required positional argument: 'args'

It appears the code is indeed invalid, as the offending call found here:

sending_result = send_reports_result_request(
commit_sha=commit_sha,
report_code=code,
encoded_slug=encoded_slug,
service=service,
token=token,
enterprise_url=enterprise_url,
)

Does indeed not pass the required args value to the function defined there:

def send_reports_result_request(
commit_sha,
report_code,
encoded_slug,
service,
token,
enterprise_url,
args,
):

@rohan-at-sentry rohan-at-sentry added the Test Analytics Test Analytics label Oct 30, 2024
@thomasrockhu-codecov thomasrockhu-codecov added Area: Report Upload Issues with pre-ingest report uploading Test Analytics Test Analytics bug Something isn't working high High Priority Issues (to be fixed within 2 sprints) and removed Test Analytics Test Analytics labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Report Upload Issues with pre-ingest report uploading bug Something isn't working high High Priority Issues (to be fixed within 2 sprints) Test Analytics Test Analytics
Projects
None yet
Development

No branches or pull requests

4 participants