BuildOperationNotificationBridgeTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Stop buffering operation notifications earlier

Now that the scans listener appears during settings, we can stop earlier

    • -2
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 1 more file in changeset.
Inline org.gradle.testing.internal.util.Specification

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 53 more files in changeset.
Inline org.gradle.testing.internal.util.Specification

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 53 more files in changeset.
Inline org.gradle.testing.internal.util.Specification

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 52 more files in changeset.
Inline org.gradle.testing.internal.util.Specification

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 53 more files in changeset.
Re-add deleted-by-mistake tests

#6999

    • -1
    • +233
    ./BuildOperationNotificationBridgeTest.groovy
Simplify BuildOperationNotificationListenerRegistrar

Only keep the method used by build scan plugin 2.0, which is the minimum

version required for Gradle 5.0+.

    • -246
    • +9
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 9 more files in changeset.
Allow a build operation notification listeners during continuous build (#5453)

This accidentally worked < 4.7. In 4.7 the notification bridge became cross session scoped in order to support bridging the logging output to progress notifications. This broke what was accidentally working, by retaining the notification listener across builds of a continuous build.

This change restores the accidental support by explicitly clearing the bridge state after each build of a continuous build, allowing a new listener on the subsequent build.

    • -9
    • +37
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 12 more files in changeset.
Allow build operation listeners to log (#4693)

This change moves build operation listening out of the standard listener infrastructure, to remove serialisation guarantees. As logging output now causes build operation notifications, whenever a build operation listener logged something it would fail due to the listener manager blocking overlapping signals.

By moving build operation listening out, overlapping and concurrent signals are now allowed.

This places more responsibility on listener implementations (e.g. thread safety), but there are few and they are all internal.

Additionally, listeners will now never receive progress notifications before start notifications and after finish notifications for that operation.

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 18 more files in changeset.
Emit build operation progress events for logging output (#4537)

* Tweak BuildOperationListener#progress api

* Use build operation id to reference progress

* Add workaround for tracing log output via build operation progress for composite builds

* Replace some Object typing of operation identifiers with OperationIdentifier.

* Associate all progress logging with the current build operation.

* Update logic to accommodate for all progress events now having build operation IDs.

* Don't allow ProgressStartEvent.buildOperationCategory to be null.

** Default it to uncategorized.

    • -4
    • +10
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 50 more files in changeset.
Rationalise handling of “current” build operation and build operation ID

For an upcoming change to emit console logging as build operation progress events, we need to associate all progress logging with the build operation. This pulled a thread on some long overdue cleanup.

The end result is:

1. Base build operation infrastructure is consolidated org.gradle.internal.operations.

2. Mechanism for passing thread global current build operation is more test friendly, and better named.

3. A consistent mechanism is used for binding the current operation to the thread, instead of two mechanisms.

4. Build operation IDs are typed to OperationIdentifier.

There is no public API or user behaviour change.

    • -8
    • +12
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 147 more files in changeset.
Include GradleBuild task build operations in the build operation tree (#4560).

This is the conceptual intent. Furthermore, it's necessary for build operation notification based log output which will be required for scans.

    • -26
    • +20
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 26 more files in changeset.
rename interface to fix Checkstyle

    • -9
    • +9
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 4 more files in changeset.
Introduce build operation progress events, only used for conveying test output to build scans currently.

    • -0
    • +67
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 22 more files in changeset.
Reduce/confine the mutability in build operation notification bridge.

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 1 more file in changeset.
Expose operation start/finish timestamps on notifications. (#2834)

* Expose operation start/finish timestamps on notifications.

* Add since.

    • -15
    • +18
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 3 more files in changeset.
Use a fresh transforming listener when recorded operations are not required

Instead of tracking the recorded operation stream to ensure that we don't

emit finish events for 'unstarted' operations, we instead create a new

transforming operation listener and completely discard the recorded notifications.

    • -13
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 1 more file in changeset.
Rename new interface method

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 3 more files in changeset.
Make BuildOperationNotificationListenerRegistrar compatible to build scan plugin 1.8

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 3 more files in changeset.
Replace `BuildOperationRecorder` with thread-safe recording listener

    • -12
    • +23
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 3 more files in changeset.
Moved `BuildOperationNotificationServices` to BuildTree scope

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 6 more files in changeset.
Improve the way the BuildOperationRecorder is started

- Explicitly initialize `BuildOperationNotificationBridge` when starting

Gradle instance.

- Move BuildOperationRecorder to (effective) build-tree scope.

- Move BuildOperationRecorder into o.g.internal.operations.notify

    • -2
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 6 more files in changeset.
fix unit test after reworking recorder handling

    • -1
    • +0
    ./BuildOperationNotificationBridgeTest.groovy
Provide more details about already registered listener (classname)

    • -5
    • +5
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 2 more files in changeset.
Avoid instanceof when comparing recorded BO event type for forwarding to listener

    • -1
    • +1
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 2 more files in changeset.
Introduce Build Operation Recorder

- Allow BuildOperationNotificationListener to handle operations

fired before listeners are registered.

- stop recording after root project is evaluated

    • -2
    • +31
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 5 more files in changeset.
Prevent multiple build operation notification listeners.

The notification bridge has to do some work to translate from raw operation events to notifications.

Therefore, each listener introduces overhead.

We could use a broadcaster to get around this, but that incurs performance penalties in reflection and serialization that is unnecessary to pay for this case.

    • -1
    • +12
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 2 more files in changeset.
Include parent operation IDs in notifications.

The parent ID of a notification is the ID of the nearest operation that

also resulted in a notification.

    • -29
    • +110
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 3 more files in changeset.
Build operation notification listeners are build tree scoped.

Previously, they registered with the global scoped listener manager.

This meant that they received events from different build trees — i.e. GradleBuild tasks.

    • -0
    • +156
    ./BuildOperationNotificationBridgeTest.groovy
  1. … 11 more files in changeset.