Introduce additional JsonValue types to be storable as facts. This enables the possibility to store more complex objects for fact checking purposes. The rules engine supports walking keyed object values directly to create rules and checks
Modify facts database table to have a more restricted timestamp precision for cases where the postgres server isn't configured to contain such value. This fixes the issue where in some cases `maxItems` lifecycle condition didn't work as expected. resolves #11595 Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
"@backstage/backend-common": "^0.14.0-next.2",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/plugin-tech-insights-common": "^0.2.4",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"@types/luxon": "^2.0.5",
|
||||
"luxon": "^2.0.2",
|
||||
"winston": "^3.2.1"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
import { DateTime, Duration, DurationLike } from 'luxon';
|
||||
import { Config } from '@backstage/config';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import {
|
||||
PluginEndpointDiscovery,
|
||||
TokenManager,
|
||||
@@ -55,6 +56,7 @@ export type TechInsightFact = {
|
||||
| string[]
|
||||
| boolean[]
|
||||
| DateTime[]
|
||||
| JsonValue
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -94,9 +96,16 @@ export type FactSchema = {
|
||||
* Type of the individual fact value
|
||||
*
|
||||
* Numbers are split into integers and floating point values.
|
||||
* `set` indicates a collection of values
|
||||
* `set` indicates a collection of values, `object` indicates JSON serializable value
|
||||
*/
|
||||
type: 'integer' | 'float' | 'string' | 'boolean' | 'datetime' | 'set';
|
||||
type:
|
||||
| 'integer'
|
||||
| 'float'
|
||||
| 'string'
|
||||
| 'boolean'
|
||||
| 'datetime'
|
||||
| 'set'
|
||||
| 'object';
|
||||
|
||||
/**
|
||||
* A description of this individual fact value
|
||||
|
||||
Reference in New Issue
Block a user