Deprecation warnings do not explicitly name the resource

Bug #1524512 reported by Joe D'Andrea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Sergey Kraynev

Bug Description

Reported via heat/engine/environment.py:297

UserWarning: This resource is deprecated and use is discouraged. Please use resource OS::Heat:SoftwareDeploymentGroup instead. info.value.support_status.message))
UserWarning: This resource is deprecated and use is discouraged. Please use resource OS::Heat:StructuredDeploymentGroup instead. info.value.support_status.message))
UserWarning: This resource is not supported, use at your own risk. info.value.support_status.message))
UserWarning: Use the `external_gateway_info` property in the router resource to set up the gateway. info.value.support_status.message))

I'm thinking this could be made clearer. I'm also not sure why the ")) is there at the end.

Joe D'Andrea (jdandrea)
Changed in heat:
assignee: nobody → Joe D'Andrea (joedandrea)
Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Update: The "))" is at the end because of /usr/lib/python2.7/warnings.py(39)formatwarning():

  line = linecache.getline(filename, lineno) if line is None else line

In the case of heat the warning call spans multiple lines, and linecache.getline only uses the last one:

  https://github.com/openstack/heat/blob/master/heat/engine/environment.py#L297

Thus every log line that goes through formatwarning() includes this at the end, which doesn't provide much context:

  info.value.support_status.message))

description: updated
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Triaged → In Progress
Changed in heat:
milestone: none → mitaka-3
Changed in heat:
milestone: mitaka-3 → mitaka-rc1
Changed in heat:
assignee: Joe D'Andrea (joedandrea) → Sergey Kraynev (skraynev)
Changed in heat:
milestone: mitaka-rc1 → mitaka-rc2
tags: added: mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/257477
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=7ccf4d045e81566c85ff7f09979bd1a6b607a395
Submitter: Jenkins
Branch: master

commit 7ccf4d045e81566c85ff7f09979bd1a6b607a395
Author: Joe D'Andrea <email address hidden>
Date: Mon Dec 14 16:39:30 2015 +0000

    Explicitly naming resources in "unsupported" warnings

    Warnings that a resource is not supported are now prefaced
    with the resource name and status (e.g., DEPRECATED). In
    addition, the warning is now logged via LOG.warn(_LW()).

    Previously, warnings.warn(six.text_type()) was used. In
    addition to being routed to the log file, it included a
    confusing reference to the last line of invocation, which
    was the fragment "info.value.support_status.message))".

    Change-Id: I006120a395007d88f3ba04a4af89283a1a077c3f
    Closes-Bug: #1524512

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/294093

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/mitaka)

Reviewed: https://review.openstack.org/294093
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=a7403a9e5abd01946453d8b4a4015e705b6729d6
Submitter: Jenkins
Branch: stable/mitaka

commit a7403a9e5abd01946453d8b4a4015e705b6729d6
Author: Joe D'Andrea <email address hidden>
Date: Mon Dec 14 16:39:30 2015 +0000

    Explicitly naming resources in "unsupported" warnings

    Warnings that a resource is not supported are now prefaced
    with the resource name and status (e.g., DEPRECATED). In
    addition, the warning is now logged via LOG.warn(_LW()).

    Previously, warnings.warn(six.text_type()) was used. In
    addition to being routed to the log file, it included a
    confusing reference to the last line of invocation, which
    was the fragment "info.value.support_status.message))".

    Change-Id: I006120a395007d88f3ba04a4af89283a1a077c3f
    Closes-Bug: #1524512
    (cherry picked from commit 7ccf4d045e81566c85ff7f09979bd1a6b607a395)

tags: added: in-stable-mitaka
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0rc2

This issue was fixed in the openstack/heat 6.0.0.0rc2 release candidate.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)
Download full text (13.0 KiB)

Reviewed: https://review.openstack.org/302565
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=eeed79b7a2da4a8f7fcbe0c8a7c7a069f304ae11
Submitter: Jenkins
Branch: master

commit bea576f802f993204aaaaea82812820f2f51c668
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Wed Mar 30 16:09:29 2016 +0300

    Sync integration tests requirements

    The patch that auto-generates integration tests requirements [1] missed
    Mitaka release.

    This patch manually syncs the integration tests requirements hopefully
    for the last time.

    [1] Ie79338cc10cc101fbf15b51c7923e3a7b8e4fbb4

    Change-Id: I3f001bcb7900f6d822055bf3567773b3a594227d

commit 950505d956e99bc9eed7d6fb0223800251d88b95
Author: Rabi Mishra <email address hidden>
Date: Wed Mar 30 09:34:36 2016 +0530

    Revert "Check RBAC policy for nested stacks"

    This is causing issues with tripleo failures
    with ValueError, when trying do stack-preview as
    part of policy enforcement for stack DELETE.

    This reverts commit a8accbba98b5fc15562864030f49d20570bf8412.

    Change-Id: I366316f27f24c650bd435e67dd17abd8676cedf4
    Closes-Bug: #1561172
    (cherry picked from commit 354f1bcef038340d95f7dc4bc29268c9efed642e)

commit 184b09a40672ccfe1964bbf4fc72234d4cd012b6
Author: OpenStack Proposal Bot <email address hidden>
Date: Wed Mar 30 06:08:07 2016 +0000

    Imported Translations from Zanata

    For more information about this automatic import see:
    https://wiki.openstack.org/wiki/Translations/Infrastructure

    Change-Id: I656cedd8162b5a7d1682a33ab9b836ba25d22de9

commit 0c407b8596499466b93d5b511e19b0de130b6f03
Author: Zane Bitter <email address hidden>
Date: Mon Mar 28 17:19:47 2016 -0400

    Add translation rule to delete ssh auth key from Magnum baymodel

    Add a translation rule to ensure that users with existing templates will
    not have them break when they update due to the 'ssh_authorized_key'
    property having been removed from Magnum and hidden in Heat.

    Change-Id: Id73bace93bfc2379e80777da7dc0c0bb059d6cd3
    Related-Bug: #1560284
    (cherry picked from commit 0ab68f891348eeafa1efa219070ef39f776cb6c6)

commit db06ee4514b0cc8037f037788c34631c272cfc6b
Author: Sergey Kraynev <email address hidden>
Date: Thu Mar 24 04:30:39 2016 -0400

    Increase timeout of WaitCondition due to ConcurrentTransactions

    Currently we have retry logic with random period of delay.
    There is a chance, when we have several re-try attemts with maximum
    timeout, so it can be a root cause of floating fails, when we have not
    enough time for getting all signals.

    Also decrease number of signals from 30 to 25, due to small risk, when
    one of signals goes to ConcurrentTransaction error.

    Note, that all these changes are made in corresponding functional test
    and don't affect main code.

    Change-Id: I9ca85c4378d0f62e316f4f40ff73597ffaaabadf
    Related-Bug: #1497274
    (cherry picked from commit 8f370d6174c7574c6ee611b5089eac8a4c37dbf2)

commit 145be139cc8a34c57f84e1991031cfc2595477ba
Author: OpenStack Proposal Bot <openstack-infra...

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/heat 7.0.0.0b1

This issue was fixed in the openstack/heat 7.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.