Validation failed. File './tasks.yaml' does not exist

Bug #1552248 reported by Aleksandr Didenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel Plugins
Invalid
High
Max Yatsenko
Fuel for OpenStack
Fix Released
High
Alexander Kislitsky

Bug Description

Using fpb 4.0.0 from pip:
fuel-plugin-builder (4.0.0)

And "package_version: '4.0.0'" in metadata.yaml

According to fuel-plugin docs https://wiki.openstack.org/wiki/Fuel/Plugins#deployment_tasks.yaml :
New "deployment_tasks.yaml" file was introduced to replace the "tasks.yaml".

But when I try to build my plugin I get this:

fpb --build .
Validation failed
File './tasks.yaml' does not exist

If I change package_version to '3.0.0' then it works fine.

Steps to reproduce:
1) Download https://github.com/openstack/fuel-plugin-external-lb
2) Change package_version to '4.0.0' in metadata.yaml
3) Run: fpb --build .

Changed in fuel-plugins:
assignee: nobody → Fuel Python Team (fuel-python)
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → High
tags: added: area-python
Changed in fuel:
milestone: none → 9.0
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: feature-plugins
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

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

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → vkulanov (vitaliy-t)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugins (master)

Change abandoned by Vitalii Kulanov (<email address hidden>) on branch: master
Review: https://review.openstack.org/288985

Changed in fuel:
assignee: vkulanov (vitaliy-t) → nobody
Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

After some time of code review I find an information that possible can help to fix this bug.

When we use "package_version: '4.0.0'" in metadata.yaml in order to validate yaml schemas 'check_schemas' method of ValidatorV4 class is used. As I can see for backward compatibility 'check_tasks_schema' method is also used. So when we try to check 'fuel-plugin-external-lb' we have a problem, because tasks.yaml is not there.

As I can see for "package_version: '3.0.0'" the verification problem does not exist, because the parameter 'allow_not_exists' of the method 'check_schemas' (Validator_v3 class) set to True (https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/validators/validator_v3.py#L59). Means we shouldn't check deprecated tasks.yaml file existence.

So this bug can be fixed in the same manner, just put allow_not_exists=True (do not check file existence) instead of allow_empty=True in https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/validators/validator_v4.py#L50.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

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

Changed in fuel:
assignee: nobody → vkulanov (vitaliy-t)
Changed in fuel-plugins:
status: New → Confirmed
Revision history for this message
Ilya Kutukov (ikutukov) wrote :

The same plugin without tasks.yaml will fail in fuel 8.0 but will be ok for 9.0, so validation of the 4.0.0 package version will be different. And that's not good.

At least this change should be backported to the fuel 8.0.

Revision history for this message
Ilya Kutukov (ikutukov) wrote :

What about fuel 3.0.0 the tasks.yaml required for it too and this is the bug of validator allowing to build plugin without this file.

Revision history for this message
Ilya Kutukov (ikutukov) wrote :

tasks.yaml is planned to be deprecated only in plugins package v5.0.0, please, see the spec
https://review.openstack.org/#/c/271417/9/specs/9.0/plugins-v5.rst

Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

So, as far as I understand here is a bug https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/validators/validator_v3.py#L59? Means that till 5.0.0 version we shouldn't validate plugins without tasks.yaml file.
Then what about this option https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/validators/validator_v4.py#L50. Can it be empty?

Revision history for this message
Alexander Kislitsky (akislitsky) wrote :

@Vitaly, you don't mind if I assing this bug on myself?

Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

No problem

Changed in fuel:
assignee: vkulanov (vitaliy-t) → Alexander Kislitsky (akislitsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugins (master)

Change abandoned by Vitalii Kulanov (<email address hidden>) on branch: master
Review: https://review.openstack.org/289203
Reason: In favor https://review.openstack.org/#/c/291199/

Maciej Relewicz (rlu)
Changed in fuel-plugins:
milestone: none → 8.0
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

Reviewed: https://review.openstack.org/291199
Committed: https://git.openstack.org/cgit/openstack/fuel-plugins/commit/?id=a22bc32ee87a0fb81cd1e15af0cd61b4329447c2
Submitter: Jenkins
Branch: master

commit a22bc32ee87a0fb81cd1e15af0cd61b4329447c2
Author: Alexander Kislitsky <email address hidden>
Date: Thu Mar 10 17:07:59 2016 +0300

    File tasks.yaml made optional for V4 plugins

    Plugin developers don't need to have tasks.yaml any more.

    Change-Id: Ieff19c5a1d8f9a647076afdf2b4028e96be1ce7e
    Closes-Bug: #1552248

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
tags: removed: on-verification
Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

Verify with fuel-plugin-builder-4.0.0:

tasks.yaml is present in fuel-plugin-external-lb and plugin is built:

~/Documents/Repos/fuel-plugin-external-lb$ fpb --build .
Plugin is built

Changed in fuel:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugins (master)

Change abandoned by Ilya Kutukov (<email address hidden>) on branch: master
Review: https://review.openstack.org/355572
Reason: History should be purged

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugins (master)

Change abandoned by Fuel DevOps Robot (<email address hidden>) on branch: master
Review: https://review.openstack.org/365418
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Max Yatsenko (myatsenko) wrote :

As the issue was fixed by this patch https://review.openstack.org/#/c/291199/,
so since 'fpb 4.1.0' the bug is not reproduced.
'fuel-plugin-builder' is installed by 'pip' utility and for 'MOS 8.0' version 4.2.0 is installed by default. Due to reason I close this issue for MOS 8.0 as invalid.

Changed in fuel-plugins:
assignee: Fuel Python (Deprecated) (fuel-python) → Max Yatsenko (myatsenko)
status: Confirmed → Invalid
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.