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

force re-execute of existing run tracebacks #3484

Open
thrix opened this issue Jan 26, 2025 · 1 comment
Open

force re-execute of existing run tracebacks #3484

thrix opened this issue Jan 26, 2025 · 1 comment
Assignees
Labels
step | execute Stuff related to the execute step

Comments

@thrix
Copy link
Collaborator

thrix commented Jan 26, 2025

Found this when working on one of my issues:

$ cat plan.fmf
discover:
  - name: local
    how: fmf
  - name: local-again
    how: fmf

provision:
  how: local

execute:
  how: tmt

$ cat test1.fmf
test: "false"

$ cat test2.fmf
test: echo test2
$  tmt --feeling-safe run -a -i ~/temp/run 
....
total: 2 tests passed and 2 tests failed

$ TMT_SHOW_TRACEBACK=1 tmt --feeling-safe run -a -i ~/temp/run execute --force
/var/home/thrix/temp/run
warn: User is feeling safe.

/plan
    discover
        status: done
        summary: 4 tests selected
    provision
        status: done
        summary: 1 guest provisioned
    prepare
        status: done
        summary: 0 preparations applied
    execute
        queued execute task #1: local on default-0
        queued execute task #2: local-again on default-0

        execute task #1: local on default-0
        how: tmt
        progress:
        fail: Failed to write into '/var/home/thrix/temp/run/plan/discover/local/tests/tmt-test-wrapper.sh-local-test1-1-default-0-default-0' file.

        summary: 0 tests executed
    report
        how: display
        summary: no results found
    finish
        status: done
        summary: 0 tasks completed

plan failed

    Traceback (most recent call last):

    File /var/home/thrix/git/github.com/teemtee/tmt/tmt/__main__.py, line 33, in run_cli
      tmt.cli._root.main()
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/core.py, line 1161, in __call__
      return self.main(*args, **kwargs)
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/core.py, line 1082, in main
      rv = self.invoke(ctx)
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/core.py, line 1697, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/core.py, line 1729, in invoke
      return _process_result(rv)
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/core.py, line 1666, in _process_result
      value = ctx.invoke(self._result_callback, value, **ctx.params)
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/core.py, line 788, in invoke
      return __callback(*args, **kwargs)
    File /home/thrix/.local/share/hatch/env/virtual/tmt/P0BaSRXW/dev/lib/python3.12/site-packages/click/decorators.py, line 33, in new_func
      return f(get_current_context(), *args, **kwargs)
    File /var/home/thrix/git/github.com/teemtee/tmt/tmt/cli/_root.py, line 332, in finito
      click_context.obj.run.go()
    File /var/home/thrix/git/github.com/teemtee/tmt/tmt/base.py, line 3793, in go
      raise tmt.utils.GeneralError(

The exception was caused by 1 earlier exceptions

Cause number 1:

    execute step failed

        Traceback (most recent call last):

        File /var/home/thrix/git/github.com/teemtee/tmt/tmt/base.py, line 3789, in go
          plan.go()
        File /var/home/thrix/git/github.com/teemtee/tmt/tmt/base.py, line 2467, in go
          step.go()
        File /var/home/thrix/git/github.com/teemtee/tmt/tmt/steps/execute/__init__.py, line 1222, in go
          raise tmt.utils.GeneralError(

    The exception was caused by 1 earlier exceptions

    Cause number 1:

        Failed to write into '/var/home/thrix/temp/run/plan/discover/local/tests/tmt-test-wrapper.sh-local-test1-1-default-0-default-0' file.

            Traceback (most recent call last):

            File /var/home/thrix/git/github.com/teemtee/tmt/tmt/queue.py, line 276, in go
              result = future.result()
            File /usr/lib64/python3.12/concurrent/futures/_base.py, line 449, in result
              return self.__get_result()
            File /usr/lib64/python3.12/concurrent/futures/_base.py, line 401, in __get_result
              raise self._exception
            File /usr/lib64/python3.12/concurrent/futures/thread.py, line 59, in run
              result = self.fn(*self.args, **self.kwargs)
            File /var/home/thrix/git/github.com/teemtee/tmt/tmt/steps/__init__.py, line 2324, in run_on_guest
              self.phase.go(guest=guest, logger=logger)
            File /var/home/thrix/git/github.com/teemtee/tmt/tmt/steps/execute/internal.py, line 510, in go
              self._run_tests(guest=guest, extra_environment=environment, logger=logger)
            File /var/home/thrix/git/github.com/teemtee/tmt/tmt/steps/execute/internal.py, line 543, in _run_tests
              self.execute(
            File /var/home/thrix/git/github.com/teemtee/tmt/tmt/steps/execute/internal.py, line 336, in execute
              self.write(test_wrapper_filepath, str(test_command), 'w')
            File /var/home/thrix/git/github.com/teemtee/tmt/tmt/utils/__init__.py, line 1976, in write
              raise FileError(f"Failed to write into '{path}' file.") from error

        The exception was caused by 1 earlier exceptions

        Cause number 1:

            [Errno 2] No such file or directory: '/var/home/thrix/temp/run/plan/discover/local/tests/tmt-test-wrapper.sh-local-test1-1-default-0-default-0'

                Traceback (most recent call last):

                File /var/home/thrix/git/github.com/teemtee/tmt/tmt/utils/__init__.py, line 1973, in write
                  path.write_text(data, encoding='utf-8', errors='replace')
                File /usr/lib64/python3.12/pathlib.py, line 1047, in write_text
                  with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
                File /usr/lib64/python3.12/pathlib.py, line 1013, in open
                  return io.open(self, mode, buffering, encoding, errors, newline)
@thrix thrix added the step | execute Stuff related to the execute step label Jan 26, 2025
@thrix thrix self-assigned this Jan 26, 2025
@thrix
Copy link
Collaborator Author

thrix commented Jan 30, 2025

/packit propose-downstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
step | execute Stuff related to the execute step
Projects
None yet
Development

No branches or pull requests

1 participant