directory which generated by tempest-plugin-cookiecutter structure has been changed

Bug #1517310 reported by Yuiko Takada
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Invalid
Undecided
Unassigned

Bug Description

Using latest tempest-plugin-cookiecutter(with cookiecutter==0.9.1), directory structure has been changed,
Generated new directory named <repo_name>_tempest_tests has been moved under <repo_name> to <repo_name>/<repo_name>

e.g. )
project: Ironic
repo_name: ironic
testclass: IronicTempestPlugin

system@takada-dev:/opt/stack/ironic$ cookiecutter https://git.openstack.org/openstack/tempest-plugin-cookiecutter

[before]
/opt/stack/ironic
  ironic_tempest_plugin
    config.py
    plugin.py
    tests/
      api/
      scenario/
    services/
      client.py

[after]
/opt/stack/ironic
  ironic
    ironic_tempest_plugin
      config.py
      plugin.py
      tests/
        api/
        scenario/
      services/
        client.py

Revision history for this message
Yuiko Takada (takada-yuiko) wrote :

I guess it occurs due to this change https://review.openstack.org/#/c/246104/ . Will it be solved by removing {{cookiecutter.repo_name}} directory and moving {{cookiecutter.repo_name}}_tempest_plugin directory under tempest-plugin-cookiecutter? I'm not sure.

Revision history for this message
Yuiko Takada (takada-yuiko) wrote :

In addition, I tried in my local env like "cookiecutter ~/.cookiecutters/tempest-plugin-cookiecutter/" (I removed ~/.cookiecutters/tempest-plugin-cookiecutter/{{cookiecutter.repo_name}} and moved ~/.cookiecutters/{{cookiecutter.repo_name}}_tempest_plugin directory under ~/.cookiecutters/tempest-plugin-cookiecutter/), it succeed, but I don't have confidence.

Changed in tempest:
assignee: nobody → Yuiko Takada (takada-yuiko)
Revision history for this message
Matthew Treinish (treinish) wrote :

Yeah, this was caused by that change. Those are just templates basically and it fills in the value from the cookiecutter.json. I figured you did it intentionally to make the cookiecutter work for standalone plugin repos.

So I'm curious, is this really a bug? I guess it comes back to what our intent is for the plugin cookiecutter. If it's to make a standalone plugin then the bug is that we're missing setup.py and the other base pieces for a python project. If we're only targeting plugins that go in an existing repo then we don't need the outer dir. We also should remove the git pieces and any other base project pieces.

TBH, when I was originally designing the tempest plugin interface I imagined that standalone plugins would be what most people wanted to use. Mostly because it gives you packaging advantages and it lets you decouple your tests from releases and branches. But, I guess most people don't see it that way.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest-plugin-cookiecutter (master)

Fix proposed to branch: master
Review: https://review.openstack.org/246746

Changed in tempest:
status: New → In Progress
Revision history for this message
Yuiko Takada (takada-yuiko) wrote :

Matthew, thank you for your comment.

My intention of that change was just wanted to improve doc so that I recognize that current situation is just a bug.

I am satisfied with tempest-plugin-cookiecutter as is. I assume that this project is targeting existing repositories. From Ironic developer's point of view, I just want to move tempest tests in tempest into ironic as soon as possible and easily, and I guess other project developers think so, too.

But if we want to make this project cover both types - existing repository and new repository, we can do it with original directory structure - if someone want to use this for standalone plugins, he can do it by running cookiecutter after creating a directory. And what does "git things" mean?

Revision history for this message
chandan kumar (chkumar246) wrote :

Unassigning this bug as there is no activity from last 6 months. If you are still want to work on this bug, feel free to assign yourself.

Changed in tempest:
assignee: Yuiko Takada (takada-yuiko) → nobody
Revision history for this message
Martin Kopec (mkopec) wrote :

No change more than a year and according to the comments written here and in the review [1], I assume it's not an issue any more -> marking as invalid.

[1] https://review.openstack.org/#/c/246746/

Changed in tempest:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest-plugin-cookiecutter (master)

Change abandoned by Yuiko Takada Mori (<email address hidden>) on branch: master
Review: https://review.opendev.org/246746

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.