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

Hard to debug tmt plans ls with remote plans #2918

Open
lukaszachy opened this issue May 9, 2024 · 1 comment
Open

Hard to debug tmt plans ls with remote plans #2918

lukaszachy opened this issue May 9, 2024 · 1 comment
Labels
enhancement New feature or request logging plans

Comments

@lukaszachy
Copy link
Collaborator

Scenario: fmf data seems correct, changes are pushed, but tmt plans ls complains with No tree node found for XXX reference.

Culprit was in 'fmf' which caches cloned repo but that is not visible from any log (TMT_DEBUG=1 nor plans --dddvvv print anything).

IMO we need:

Bonus

  • have tmt option/flag to force fetching fresh data (needs fmf feature as well)
@lukaszachy lukaszachy added enhancement New feature or request plans logging labels May 9, 2024
@lukaszachy
Copy link
Collaborator Author

Possible reproducer:

$ mkdir -p /tmp/reproducer/remote
$ cd /tmp/reproducer/remote
#  repo contains no plan, just fmf root
$ git init && tmt init && git commit -m just-fmf-root

$ mkdir -p /tmp/reproducer/local
$ cd /tmp/reproducer/local
$ tmt init
$ cat <<EOF > plan.fmf
plan:
    import:
        url: /tmp/reproducer/remote
        name: /foo
EOF
# Expected outcome for this call:
$ tmt p ls

No tree node found for '{'url': '/tmp/reproducer/remote', 'name': '/foo'}' reference
$ cd /tmp/reproducer/remote
$ cat <<EOF > foo.fmf
execute:
  how: tmt
EOF
$ git add foo.fmf && git commit -m added-plan

# Plan addded to the remote, but plan cannot import it...
$ cd /tmp/reproducer/local
$ tmt p ls

No tree node found for '{'url': '/tmp/reproducer/remote', 'name': '/foo'}' reference

# It used cached repo... and at that time /foo was not there.
# There is no way how to see this from debug output
# To see that it works if it does fresh checkout ...
$ rm -rf ~/.cache/fmf/_tmp_reproducer_remote*
$ tmt p ls
/plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logging plans
Projects
None yet
Development

No branches or pull requests

1 participant