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

New osc plugin 'cycle': help visualizing build cycles #992

Merged
merged 1 commit into from Jul 10, 2017
Merged

New osc plugin 'cycle': help visualizing build cycles #992

merged 1 commit into from Jul 10, 2017

Conversation

DimStar77
Copy link
Contributor

This new plugin creates dot files, visualizing the relation between the
package speciied on the command line. A major use case is visualizing
build cycles that are reported by OBS, but often not very clear to debug.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 45.035% when pulling cdb19df on DimStar77:visualize-cycles into f6d0818 on openSUSE:master.

@DimStar77
Copy link
Contributor Author

A sample cycle that was visualized: http://paste.opensuse.org/5320485

Copy link
Contributor

@jberry-suse jberry-suse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be interesting if this could be integrated into the new repo-checker output to show the new cycle edges as image instead of just text.

osc-cycle.py Outdated
print ("digraph depgraph {")
for pkgname in args:
print ("\"%s\"" % pkgname)
url = makeurl(apiurl, ["build/openSUSE:Factory/standard/x86_64/_builddepinfo?package=%s&view=pkgnames" % pkgname])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osc.core.get_dependson(), also osclib.core.depends_on(). If an additional arch parameter would be added then it could skip loop and only return that architecture results.

osc-cycle.py Outdated

from __future__ import print_function

from osc import cmdln
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seemingly unused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true - that was rather prepared as at one point we will need cmdline parameters - we won't always want to run against oS:F - will remove for now though

osc-cycle.py Outdated
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

from __future__ import print_function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seemingly unused

This new plugin creates dot files, visualizing the relation between the
package speciied on the command line. A major use case is visualizing
build cycles that are reported by OBS, but often not very clear to debug.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 45.035% when pulling 2d8122f on DimStar77:visualize-cycles into 17098f7 on openSUSE:master.

@coolo
Copy link
Member

coolo commented Jul 9, 2017

http://search.cpan.org/~shlomif/Graph-Easy-0.76/bin/graph-easy is also having a ascii output

@coolo
Copy link
Member

coolo commented Jul 9, 2017

     +-------------------------+
     |         openucx         |
     +-------------------------+
       ^
       |
       |
     +-------------------------+
  +> |        rdma-core        | -+
  |  +-------------------------+  |
  |    |                          |
  |    |                          |
  |    v                          |
  |  +-------------------------+  |
  |  |         openmpi         |  |
  |  +-------------------------+  |
  |    |                          |
  |    |                          |
  |    v                          |
  |  +-------------------------+  |
  |  |          boost          | <+
  |  +-------------------------+
  |    |
  |    |
  |    v
  |  +-------------------------+
  |  | thin-provisioning-tools |
  |  +-------------------------+
  |    |
  |    |
  |    v
  |  +-------------------------+
  |  |      device-mapper      |
  |  +-------------------------+
  |    |
  |    |
  |    v
  |  +-------------------------+
  +- |         systemd         |
     +-------------------------+

@coolo
Copy link
Member

coolo commented Jul 9, 2017

Perhaps you simplify the cycles a bit before rendering them though :)

            +------------------------------------------------------+
            |                                                      |
            |                                                      |
            |    +---------+                                       |
            |    |         |                                       |
            |    |       +---------------------------------+       |
            |    |    +> |              boost              | <-----+----------------------+
            |    |    |  +---------------------------------+       |                      |
            |    |    |    |                             |         |                      |
            |    |    |    |                             |         |                      |
            |    |    |    v                             v         v                      |
            |    |    |  +-----------------------+     +--------------------------+     +-----------+
            |    |    |  |         swig          |     |           curl           | --> | rdma-core | <+
            |    |    |  +-----------------------+     +--------------------------+     +-----------+  |
            |    |    |    |                             |         |                                   |
            |    |    |    |                             |         |                                   |
            |    |    |    v                             |         v                                   |
            |    |    |  +-----------------------+       |       +----------------+                    |
            |    |    |  |         ldns          |       |       | python-tornado | <-----+            |
            |    |    |  +-----------------------+       |       +----------------+       |            |
            |    |    |    |                             |         |                      |            |
            |    |    |    |                             |         |                      |            |
            |    |    |    v                             |         v                      |            |
            |    |    |  +-----------------------+       |       +----------------+       |            |
            |    |    |  | libunbound-devel-mini |       |    +- | python-urllib3 | -+    |            |
            |    |    |  +-----------------------+       |    |  +----------------+  |    |            |
            |    |    |    |                             |    |    |                 |    |            |
            |    |    |    |                             |    |    |                 |    |            |
            |    |    |    v                             |    |    |                 |    |            |
            |    |    |  +-----------------------+       |    |    |                 |    |            |
            |    |    |  |        gnutls         |       |    |    |                 |    |            |
            |    |    |  +-----------------------+       |    |    |                 |    |            |
            |    |    |    |                             |    |    |                 |    |            |
            |    |    |    |                             |    |    |                 |    |            |
            |    |    |    v                             v    |    |                 |    |            |
            |    |    |  +---------------------------------+  |    |                 |    |            |
       +----+----+----+> |             systemd             |  |    |                 |    |            |
       |    |    |    |  +---------------------------------+  |    |                 |    |            |
       |    |    |    |    |                                  |    |                 |    |            |
       |    |    |    |    |                                  |    |                 |    |            |
       |    |    |    |    v                                  |    |                 |    |            |
       |    |    |    |  +-----------------------+            |    |                 |    |            |
       |    |    |    +- |        libpsm2        |            |    |                 |    |            |
       |    |    |       +-----------------------+            |    |                 |    |            |
       |    |    |                                            |    |                 |    |            |
       |    |    |                                            |    |                 |    |            |
       |    |    |                                            |    |                 |    |            |
       |    |    |       +-----------------------+            |    |                 |    |            |
       |    |    |    +- |    python-requests    | <----------+----+                 |    |            |
       |    |    |    |  +-----------------------+            |                      |    |            |
       |    |    |    |    |                                  |                      |    |            |
  +----+----+----+----+    |                             +----+                      |    |            |
  |    |    |    |         v                             v                           |    |            |
  |    |    |    |       +---------------------------------+                         |    |            |
  |    |    |    +-----> |                                 | ------------------------+----+            |
  |    |    |            |                                 |                         |                 |
  |    |    |            |                                 |                         |                 |
  |    |    +----------- |             nghttp2             | ------------------------+-----------------+
  |    |                 |                                 |                         |
  |    |                 |                                 |                         |
  |    +---------------- |                                 |                         |
  |                      +---------------------------------+                         |
  |                        ^                                                         |
  |                        |                                                         |
  |                        |                                                         |
  |                      +-----------------------+                                   |
  +--------------------> |     python-Sphinx     | <---------------------------------+
                         +-----------------------+

@DimStar77
Copy link
Contributor Author

DimStar77 commented Jul 9, 2017

@coolo thats why i wrote the plugin: simplifying them is so much easier when they are visulized (and i got bored going through the stuff manually and drawing it on paper) - the 2nd one you pasted should be shorter already next week (i submitted fixes for that one; won't be gone yet, but still shorter)

@DimStar77 DimStar77 merged commit 5800bb9 into openSUSE:master Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants