Duplicated code between mistral.utils and mistral_lib.utils

Bug #1815183 reported by Kevin Pouget
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
ali abdelal

Bug Description

Is there any reason to keep functions `cut`, `cut_string`, `cut_list` and `cut_dict`, present in mistral_lib.utils, duplicated in mistral.utils ?

Could be convenient to use the mistral_lib ones only, to be able to update/fix utils functions at one place.

Kevin Pouget (kpouget)
Changed in mistral:
assignee: nobody → Kevin Pouget (kpouget)
Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

You're correct. They are not needed in mistral repo anymore. It's just a left over from the refactoring around mistral-lib. I'm in favour of moving all utils actually into mistral-lib.

Changed in mistral:
status: New → Triaged
status: Triaged → Confirmed
importance: Undecided → Medium
milestone: none → train-2
Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

I assigned it to T-2 but if you can't take care of that please either move it to a later time or we can reassign it to someone else.

Revision history for this message
Kevin Pouget (kpouget) wrote :

> I'm in favour of moving all utils actually into mistral-lib.

Do you meen moving all functions in mistral/utils/__init__.py in mitral-lib/utils/__init.__.py ?

I actually have a patch that remove functions `cut`, `cut_string`, `cut_list` and `cut_dict` from mistral/utils/__init__.py, and replace imports of them to use the mistral-lib ones.

Changed in mistral:
milestone: train-2 → train-1
Changed in mistral:
assignee: Kevin Pouget (kpouget) → ali (alielal)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral-lib (master)

Fix proposed to branch: master
Review: https://review.opendev.org/675086

Changed in mistral:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral-lib (master)

Reviewed: https://review.opendev.org/675086
Committed: https://git.openstack.org/cgit/openstack/mistral-lib/commit/?id=070080bd1bc4c4742f6a98370b7ce1616084eded
Submitter: Zuul
Branch: master

commit 070080bd1bc4c4742f6a98370b7ce1616084eded
Author: ali <email address hidden>
Date: Wed Aug 7 10:28:46 2019 +0000

    moved generic util functions from mistral to mistral-lib

    Change-Id: I780c270e4b1a184d7d4dcc580d23697ba75edab1
    Closes-bug: #1815183

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.opendev.org/676373

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral-lib 1.2.0

This issue was fixed in the openstack/mistral-lib 1.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.opendev.org/676373
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=7e7f1cb92b34b62b235c52e45fea187e466f40cb
Submitter: Zuul
Branch: master

commit 7e7f1cb92b34b62b235c52e45fea187e466f40cb
Author: ali <email address hidden>
Date: Wed Aug 14 09:03:30 2019 +0000

    moved generic util functions from mistral to mistral-lib

    Depends-On: I780c270e4b1a184d7d4dcc580d23697ba75edab1
    Closes-bug: #1815183
    Change-Id: I5a1d402baa3f69c37f9347c8b3d02a83b8f60423

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 9.0.0.0b1

This issue was fixed in the openstack/mistral 9.0.0.0b1 development milestone.

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.