summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/widget.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Add sequence ID and widget for it."jmac/remove-sequence-idJim MacArthur2018-03-131-12/+0
| | | | This reverts commit 14234ccce3e7eec1153e810fab75afb2e90a2b22.
* Remove other references to SequenceID from the code and testsJim MacArthur2018-03-131-2/+1
| | | | | widget.py: Remove SequenceID from the list of widgets. tests/frontend/logging.py: Remove %{sequence} check.
* _frontend/widget.py: Never abbreviate frontend messagesTristan Van Berkom2018-03-131-1/+4
| | | | | | | Messages which come from the frontend do not have any backing log file where the remainder of the message can be reviewed. In the case of lengthly detailed messages originating from the frontend, we dont allow any abbreviation of the message.
* Remove brackets added inside widgetsJim MacArthur2018-03-011-19/+6
| | | | | | | | Brackets can now be added as plain text in a custom logging format string, so there's no need to add them in widgets. widget.py: Remove brackets. _status.py: Remove the 'brackets' optional argument to TimeCode.
* Add logfile format tokeniserJim MacArthur2018-03-011-11/+43
| | | | | | widget.py: Main body of tokenizer. _context.py: Read message-format from user config YAML. main.py: Pass in context message-format to LogLine constructor.
* Add the FixedText and WallclockTime widgetsJim MacArthur2018-03-011-0/+21
| | | | | | | | | | WallclockTime is set at the time a message is created. Since messages can be placed in queues before being rendered, this is not always the same time as the wallclock time when rendering the message, so it needs to be stored in the message. widget.py: Add the two new widgets _message.py: record system time when a message is created.
* Add sequence ID and widget for it.Jim MacArthur2018-03-011-0/+12
| | | | | | | | | | The idea of a sequence number/ID is to tie together all messages associated with a given timed activity, to make performance analysis easier. _context.py: Add sequence number with atomic increment _widget.py: SequenceID widget, which displays this value _message.py: sequence_id variable storing the sequence for a message.
* widget.py: Modify TimeCode to take a microseconds argumentJim MacArthur2018-03-011-1/+9
|
* widget.py: Make the displayed text for LogLine messages a widget tooJim MacArthur2018-03-011-10/+22
| | | | | Adds MessageOrLogFile widget, which contains the same functionality previously used to display messages.
* Add junction support for subprojectsJürg Billeter2018-02-081-2/+2
| | | | | This introduces junctions as a new kind of elements to allow dependencies to cross project boundaries.
* Move element and source factories from Pipeline to ProjectJürg Billeter2018-02-081-2/+2
| | | | Element and source factories use a project-specific search path.
* Get version number w/o pkg_resourcesGökçen Nurlu2018-01-311-3/+2
| | | | | | | | | | | | This removes most of the usages of pkg_resources from the codebase, helping the goal of getting rid of that completely. With this change, version number is generated during install and embedded into `__version__` which is then imported by root level `__init__`. From there, it is used by other parts of the codebase when needed. Generated `__version__` file is ignored and not tracked by git to prevent unnecessary 'changes' messages and accidental commits of that file.
* _frontend/widget.py: Change how we format failure messages.Tristan Van Berkom2018-01-111-11/+20
| | | | | | | | | | | | | | | | o Now print the message itself on the same line in place of the abbreviated log file o When reading back the last lines of the log file, prefix that with an informative message about whence the log lines come, showing the full unabbreviated log file. o Fixed the behavior of read_last_lines() so that it works as intended, problems were: - Was prepending an additional newline when the log contains more lines than we want to print - Was not printing anything at all in the case we want to print more lines than exist in the log
* _frontend: Enable logging right away, fixes issue #168Tristan Van Berkom2017-12-131-9/+5
| | | | | | | | | | | Now we just assume that logging is turned on all the time, any messages must now always go through the central context messaging APIs. As a side effect, we now send all output messages that buildstream generates to stderr, leaving stdout only to payload types of output, such as parsible `bst show` output, the output of `bst workspace list` or `bst shell`.
* Remove unused importsGökçen Nurlu2017-12-071-10/+10
|
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-061-1/+1
| | | | Hide all of buildstream's internal exceptions from the API surface.
* _frontend/widget.py: Removing architecture from the reportsTristan Van Berkom2017-11-061-2/+0
|
* Stop using pipeline.target for UI widgetsTristan Maat2017-11-041-1/+1
|
* _frontend/widget.py: Prettier formatting of messages with no associated pluginTristan Van Berkom2017-10-301-9/+11
| | | | | These come exclusively from the frontend or _pipeline.py code, we just avoid printing an element name or cache key for these messages.
* _frontend/widget.py: Report selected project options, if any.Tristan Van Berkom2017-10-101-0/+9
|
* _frontend/widget.py: print_heading() no longer recognizes %{variant}Tristan Van Berkom2017-10-081-6/+1
| | | | | No more variants on `bst show` or when printing the pipeline at session startup time.
* widget.py: Replace tail with a python implementationTristan Maat2017-09-281-6/+23
|
* Add loaded plugins to logTristan Maat2017-09-141-0/+26
|
* _frontend/widget.py: Removed pretty printing of workspace listTristan Van Berkom2017-09-041-17/+0
|
* widget.py: Added 'downloadable' element status.Tristan Van Berkom2017-08-011-0/+2
|
* Add network-retries optionJürg Billeter2017-07-271-0/+1
| | | | | | Retry network tasks up to two times by default. Fixes #30
* widget.py/userconfig.yaml: Add workspace displayTristan Maat2017-07-171-0/+35
|
* widget.py: Support %{variant} formatting in show_pipeline()Tristan Van Berkom2017-07-171-0/+3
|
* widget.py: Use _get_full_display_key()Jürg Billeter2017-07-141-11/+3
|
* _frontend/widget.py: Fixed stack trace found by Tristan MaatTristan Van Berkom2017-07-131-0/+6
| | | | | | | Early return in print_summary() if scheduler.queues is None, can happen when the pipeline early returns before running the scheduler for any reason, in which case we dont care about printing a summary of what never even happened.
* widget.py: Added LogLine.print_summary()Tristan Van Berkom2017-07-121-3/+51
| | | | | Used to print a summary at the end of a scheduler session, prints the status of queues in order.
* widget.py: Show action name in the log lines along with the element nameTristan Van Berkom2017-07-111-18/+11
| | | | | Since now we can have a lot of different queues in play, things are otherwise confusing without this hint, I think.
* Add --host-arch and --target-arch, and 'host-arches' conditionalSam Thursfield2017-07-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command adds initial cross-compilation support to BuildStream. It has been tested against a converted version of the Baserock compiler bootstrap and used to cross build sysroots for armv8l64 and ppc64l from an x86_64 host. For example, to build a sysroot for ARM v8 64-bit you can do this: bst build --target-arch=armv8b64 gnu-toolchain/stage2.bst This would cause the adapted Baserock definitions to produce a stage1 simple cross compiler that runs on the native architecture and produces armv8b64 binaries, and then cross build a stage2 sysroot that executes on armv8b64. Currently the --host-arch option does nothing of use. It will one day enable host-incompatible builds using a QEMU-powered cross sandbox. The `--arch=` option is now shorthand for `--host-arch= --target-arch=`. Elements have 2 new variables available, %{bst-host-arch} and %{bst-target-arch}. The 'arches' conditional now follows %{bst-target-arch}, while the new 'host-arches' conditional follows %{bst-host-arch}. All of --arch, --host-arch and --target-arch default to the output of `uname -a`. There's no magic here that would make all BuildStream elements suddenly able to cross compile. It is up to an individual element to support this by honouring %{bst-target-arch} in whatever way makes sense.
* main.py, widget.py: Moving some imports from main -> widgetTristan Van Berkom2017-07-051-1/+2
| | | | When we split up the frontend, these imports seem to have been left behind.
* widget.py: print_heading() now takes a styling booleanTristan Van Berkom2017-07-041-2/+6
| | | | This controls whether color is used in the output
* scheduler: Add push queue typeJürg Billeter2017-06-271-0/+1
|
* widget.py: Format dim cache keys when cache keys are missing.Tristan Van Berkom2017-05-291-3/+12
|
* widget.py: print_heading() now takes an optional 'deps' argumentTristan Van Berkom2017-05-271-2/+3
| | | | So we can control which elements we print in the heading.
* widget.py: Only print the task elements in the outputTristan Van Berkom2017-05-241-4/+6
| | | | | | This could be further enhanced to also print the originating element whenever message.task_id != message.unique_id, but for now this is better.
* widget.py: Pretty message when abbreviating log detailsTristan Van Berkom2017-05-221-2/+10
|
* frontent main.py & widget.py: Implement message detail abbreviationsTristan Van Berkom2017-05-191-2/+13
| | | | | | This addresses issue #29 by making the frontend truncate detailed messages to a configurable number of lines, default is 20 lines maximum of message detail.
* widget.py: Fixed `bst show` output to show zeored out cache keyes when ↵Tristan Van Berkom2017-05-111-4/+5
| | | | | | inconsistent Instead of showing an emtpy space and screwing with alignment.
* frontend: Now display pipeline with the heading at startup timeTristan Van Berkom2017-05-091-5/+72
| | | | | | | | | | | For any tasks which run the scheduler and have a heading, now display the full pipeline dependencies in build/stage order using the same formatting as `bst show`. The format is configurable in the user preferences. Also added a %{full-key} formatting value so the user can decide to display full keys instead of abbreviated keys, this automatically applies both to the startup summary and `bst show`.
* widget.py: TimeCode widget support to render without bracketsTristan Van Berkom2017-05-011-3/+18
| | | | | Also fix to CacheKey widget, fix display for elements before pipeline is fully resolved (avoids exceptions thrown in debug mode)
* main.py/widget.py: Handle new BUG messagesTristan Van Berkom2017-04-131-3/+4
| | | | Handle BUG mostly in the same way as FAILURE.
* Refactor: Untangling element/source namesTristan Van Berkom2017-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | o The metaelements and metasources now carry the name, the loader resolves source names now. o Element/Source factories dont require a name anymore as they are already in the meta objects o Pipeline no longer composes names o Element.name is now the original project relative filename, this allows plugins to identify that name in their dependencies, allowing one to express configuration which identifies elements by the same name that the user used in the dependencies. o Removed plugin._get_display_name() in favor of the plugin.name o Added Element.normal_name, for the cases where we need to have a normalized name for creating directories and log files o Updated frontend and test cases and all callers to use the new naming
* widget.py: Added print_heading() function to the logger.Tristan Van Berkom2017-03-081-0/+61
| | | | Used to print a heading before running a pipeline.
* Splitting up frontend assets into more consumable modules.Tristan Van Berkom2017-03-081-299/+0
|
* Restructuring, moved frontend related files to _frontend/ submoduleTristan Van Berkom2017-03-071-0/+655
Probably widget.py could be split up and cleaned up some more, but at least this puts the frontend out of the way.