@backstage/plugin-events-node
Advanced tools
Comparing version 0.4.4-next.1 to 0.4.4
{ | ||
"name": "@backstage/plugin-events-node__alpha", | ||
"version": "0.4.4-next.1", | ||
"version": "0.4.4", | ||
"main": "../dist/alpha.cjs.js", | ||
"types": "../dist/alpha.d.ts" | ||
} |
# @backstage/plugin-events-node | ||
## 0.4.4-next.1 | ||
## 0.4.4 | ||
### Patch Changes | ||
- Updated dependencies | ||
- @backstage/backend-plugin-api@1.0.2-next.1 | ||
- @backstage/errors@1.2.4 | ||
- @backstage/types@1.1.1 | ||
- f7ca00b: Fixed an issue where the event bus polling would duplicate and increase exponentially over time. | ||
## 0.4.3-next.0 | ||
## 0.4.3 | ||
### Patch Changes | ||
- 4501631: Fixed an issue where subscribing to events threw an error and gave up too easily. Calling the subscribe method will cause the background polling loop to keep trying to connect to the events backend, even if the initial request fails. | ||
- 7bd2fe9: Fix `events.useEventBus` by propagating config to `DefaultEventsService` | ||
## 0.4.2 | ||
### Patch Changes | ||
- 52a5d21: Fixed an issue where subscribing to events threw an error and gave up too easily. Calling the subscribe method will cause the background polling loop to keep trying to connect to the events backend, even if the initial request fails. | ||
By default the events service will attempt to publish and subscribe to events from the events bus API in the events backend, but if it fails due to the events backend not being installed, it will bail and never try calling the API again. There is now a new `events.useEventBus` configuration and option for the `DefaultEventsService` that lets you control this behavior. You can set it to `'never'` to disabled API calls to the events backend completely, or `'always'` to never allow it to be disabled. | ||
- e02a02b: Fix `events.useEventBus` by propagating config to `DefaultEventsService` | ||
- Updated dependencies | ||
- @backstage/backend-plugin-api@1.0.2-next.0 | ||
- @backstage/errors@1.2.4 | ||
- @backstage/types@1.1.1 | ||
- @backstage/backend-plugin-api@1.0.1 | ||
@@ -26,0 +26,0 @@ ## 0.4.1 |
@@ -138,17 +138,5 @@ 'use strict'; | ||
); | ||
if (!res.ok) { | ||
if (res.status === 404) { | ||
this.logger.info( | ||
`Polling event subscription resulted in a 404, recreating subscription` | ||
); | ||
hasSubscription = false; | ||
} else { | ||
throw await errors.ResponseError.fromResponse(res); | ||
} | ||
} | ||
backoffMs = POLL_BACKOFF_START_MS; | ||
if (res.status === 202) { | ||
lock.release(); | ||
await res.body?.getReader()?.closed; | ||
process.nextTick(poll); | ||
await res.text(); | ||
} else if (res.status === 200) { | ||
@@ -170,6 +158,11 @@ const data = await res.json(); | ||
} | ||
} | ||
} else { | ||
if (res.status === 404) { | ||
this.logger.info( | ||
`Polling event subscription resulted in a 404, recreating subscription` | ||
); | ||
hasSubscription = false; | ||
} else { | ||
this.logger.warn( | ||
`Unexpected response status ${res.status} from events backend for subscription "${subscriptionId}"` | ||
); | ||
throw await errors.ResponseError.fromResponse(res); | ||
} | ||
@@ -198,2 +191,3 @@ } | ||
} | ||
backoffMs = POLL_BACKOFF_START_MS; | ||
process.nextTick(poll); | ||
@@ -200,0 +194,0 @@ } catch (error) { |
{ | ||
"name": "@backstage/plugin-events-node", | ||
"version": "0.4.4-next.1", | ||
"version": "0.4.4", | ||
"description": "The plugin-events-node module for @backstage/plugin-events-backend", | ||
@@ -54,5 +54,5 @@ "backstage": { | ||
"dependencies": { | ||
"@backstage/backend-plugin-api": "1.0.2-next.1", | ||
"@backstage/errors": "1.2.4", | ||
"@backstage/types": "1.1.1", | ||
"@backstage/backend-plugin-api": "^1.0.1", | ||
"@backstage/errors": "^1.2.4", | ||
"@backstage/types": "^1.1.1", | ||
"cross-fetch": "^4.0.0", | ||
@@ -63,4 +63,4 @@ "uri-template": "^2.0.0" | ||
"@backstage/backend-common": "^0.25.0", | ||
"@backstage/backend-test-utils": "1.0.3-next.1", | ||
"@backstage/cli": "0.29.0-next.1", | ||
"@backstage/backend-test-utils": "^1.0.2", | ||
"@backstage/cli": "^0.28.2", | ||
"msw": "^1.0.0" | ||
@@ -67,0 +67,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94889
829
- Removed@backstage/backend-plugin-api@1.0.2-next.1(transitive)
- Removed@backstage/catalog-client@1.8.0-next.0(transitive)
- Removed@backstage/cli-common@0.1.15-next.0(transitive)
- Removed@backstage/plugin-auth-node@0.5.4-next.1(transitive)
Updated@backstage/errors@^1.2.4
Updated@backstage/types@^1.1.1