Commit Graph

9301 Commits

Author SHA1 Message Date
Gustaf Räntilä 29302d39db fix(cicd-statistics): @types/react -> devDependencies
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:56:17 +01:00
blam 476c4c52fc chore: api-reports 😅
Signed-off-by: blam <ben@blam.sh>
2022-02-09 19:56:17 +01:00
blam c2cbcaf234 chore: de-dedupe dependencies and make the build green 🤞
Signed-off-by: blam <ben@blam.sh>
2022-02-09 19:56:17 +01:00
Gustaf Räntilä 07faca1f27 fix(cicd-statistics): Fixed test issue after refactoring
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:55:49 +01:00
Gustaf Räntilä 365e3f87ad feat(cicd-statistics): Allow multi-step progress when loading statistics
Loading can take a pretty long time, and often in several steps, such as "loading builds" followed by "loading pipelines per build".

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:55:49 +01:00
Gustaf Räntilä d5acd9f035 feat(cicd-statistics): Added zoom capability to the charts
Since loading of build information can take a long time, being able to zoom "client-side", using the fetched data, is very useful.

This is built using a provider (ZoomProvider) which keeps zoom state, simplifies rendering a gray area while zooming and has a filter-function which can filter only values within the zoomed time range.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä b8454275c1 fix(cicd-statistics): Fixed progress bar animation, should be throttle, not debounce
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä fdabd241d2 feat(cicd-statistics): Added trigger reason
Some refactoring and tweaks. The trigger reason is an overlay to the build counts, and is a percentage of manually triggered builds vs all builds. When this is high, it indicates likelyhood of flaky tests.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä ec1ddbd812 docs(cicd-statistics): Made it a bit more clear this plugin requires a custom API implementation
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä 52756327cf feat(cicd-statistics): Allow custom hiding/collapsing under certain thresholds
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä 2d7f173e07 feat(cicd-statistics): Added median analysis (alongside average)
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä cbbab88d9f feat(cicd-statistics): Allow stages to individual status, and added bar charts counts, and some refactoring
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä ecaa8e7a15 fix(cicd-statistics): date-fns -> luxon
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:53:10 +01:00
Gustaf Räntilä 0a7179538a fix(cicd-statistics): Don't export branchTypes, it's not very useful
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä b8492f3b14 fix(cicd-statistics): buildType -> branchType
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä d3d16a2442 fix(cicd-statistics): Don't instanceof, do fuzzy matching for better compat
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä 6c47447256 fix(cicd-statistics): Export missing component type
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä 721dca4a14 fix(cicd-statistics): Don't export the routeRef
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä 37218e495e fix(cicd-statistics): Renamed the exported component
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä 706817149b fix(cicd-statistics): Made FilterBranchType and FilterStatusType not be parameterized
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä cf0e970bc2 fix(cicd-statistics): Added entity option to getConfiguration
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä d82fe02ecf docs(cicd-statistics): Fixed spellings in README
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Gustaf Räntilä 770c195f34 feat(cicd-statistics): Added CI/CD statistics plugin
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
2022-02-09 19:52:14 +01:00
Ben Lambert c367ddb301 Merge pull request #9440 from backstage/blam/roll-back-bad-dep
Rolling back the `@date-io/luxon` bump
2022-02-09 19:51:28 +01:00
blam 945ea0d278 chore: roll back the date-io/luxon bump
Signed-off-by: blam <ben@blam.sh>
2022-02-09 19:06:30 +01:00
Patrik Oldsberg 1cabe4264a core-components,catalog-react: update API reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-09 17:39:48 +01:00
Patrik Oldsberg 56f20465b7 core-components,catalog-react: override type for forwardRef components
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-02-09 17:10:50 +01:00
Ben Lambert e34d4ce277 Merge pull request #9362 from mdb/mdb/new-splunk-on-call-annotation
[Plugin] Splunk On-Call plugin support for 'splunk.com/on-call-routing-key' annotation
2022-02-09 14:00:03 +01:00
Ben Lambert e40e4fce19 Update CHANGELOG.md
Signed-off-by: Ben Lambert <blam@spotify.com>
2022-02-09 10:46:19 +01:00
github-actions[bot] e74f416a00 Version Packages (next) 2022-02-08 19:38:17 +00:00
Daniel Deloff 3396bc5973 remove option for disabling refresh
Signed-off-by: Daniel Deloff <44780793+rv-ddeloff@users.noreply.github.com>
2022-02-08 14:04:50 -05:00
Fredrik Adelöw cdc4282e3f Merge pull request #9351 from backstage/dependabot/npm_and_yarn/knex-1.0.2
chore(deps): bump knex from 0.95.6 to 1.0.2
2022-02-08 17:05:17 +01:00
Ben Lambert 5f0a20db15 Merge pull request #9391 from snehaljos/issue9157
Fixed bug in UI | Fix for issue #9157
2022-02-08 15:01:28 +01:00
blam 1026f12334 chore: fixing a totally different way and arguably a more simpler way.
Signed-off-by: blam <ben@blam.sh>
2022-02-08 14:36:20 +01:00
Ben Lambert 2c82f6b5dd Merge pull request #9397 from mufaddal7/feature/export-dashboard-component
export DashboardSnapshotComponent from new-relic-dashboard plugin
2022-02-08 10:06:06 +01:00
mufaddal motiwala a7abd5f35b jsDoc comment added
Signed-off-by: mufaddal motiwala <mufaddalmm.52@gmail.com>
2022-02-08 12:09:31 +05:30
Mike Ball 9552df7653 test reflects occurrence of single 'Missing Annotation'
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:59:32 -05:00
Mike Ball 04365cd213 display only 1 <MissingAnnotationEmptyState />
Per code review feedback, it's arguably unnecessary
to display duplicate `<MissingAnnotationEmptyState />`,
especially given the preceding contextual sentence
noting the supported annotations.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:59:32 -05:00
Mike Ball 1514d8a313 Update plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:59:27 -05:00
Mike Ball da9d1723f6 invalid annotation logic better reflects component logic
The EntitySplunkOnCallCard gives precedence to a `splunk.com/on-call-team`
annotation. Therefore, the InvalidAnnotation component messaging
should reflect that precedence, even in instances where _both_ supported
annotations are provided and both are deemed invalid.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball a957b9fc4d fine-tune Splunk On-Call README language
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 4ddc657bd3 add Splunk client getRoutingKeys method documentation
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 12182960f4 address TypeScript compilation failure
This fixes...

```
Run yarn tsc
yarn run v1.22.1
$ tsc
plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.test.tsx:158:26 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'Matcher'.
  Type 'undefined' is not assignable to type 'Matcher'.

158         expect(getByText(MOCK_INCIDENT.entityDisplayName)).toBeInTheDocument(),
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball ba1a3e9456 add splunk.com/on-call-routing-key docs to README
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 5669e32ac1 test component rendering w/ new annotation
Test that the Splunk On Call component properly
renders when a `splunk.com/on-call-routing-key`
annotation is used.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 07ffc7ca9d test when no Splunk On Call annotations are provided
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:09 -05:00
Mike Ball 4bda7d3045 test warning for incorrect routing key annotation
This adds a test asserting that the correct component
is rendered when the entity `splunk.com/on-call-routing-key`
does not properly map to any associated teams.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 7fa7857d48 correct incorrect team annotation test
Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball f408cabe8f handle invalid Splunk On-Call annotations
If a `splunk.com/on-call-team` annotation is provided and
the API returns no associated team, render...

```
Splunk On-Call API returned no record of teams associated with the "foo" team name
Escalation Policy and incident information unavailable. Splunk On-Call requires a valid team name or routing key.
```

If a `splunk.com/on-call-routing-key` annotation is provided and
the API returns no associated team, render...

```
Splunk On-Call API returned no record of teams associated with the "foo" routing key
Escalation Policy and incident information unavailable. Splunk On-Call requires a valid team name or routing key.
```

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00
Mike Ball 52bb1807db properly render <Missing* /> components
Corrects logic ensuring `<MissingAnnotation />` and `<MissingEventsRestEndpoint />`
render correctly. Previously, neither component would render from
within the `<Content />` component.

Signed-off-by: Mike Ball <mikedball@gmail.com>
2022-02-07 15:56:08 -05:00