Skip to content

Conversation

jake-bassett
Copy link
Contributor

Description

All single entity queries by ID will set includeInactive to true.

@jake-bassett jake-bassett requested a review from a team as a code owner March 24, 2021 23:33
filters: [new GraphQlEntityFilter(request.id, request.entityType)],
// If querying for a single API, then always want to includeInactive
includeInactive: request.entityType === ObservabilityEntityType.Api
// If querying for a single API by ID, then always want to includeInactive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skjindal93 does this work for non-api entities? Just wondering if there was a reason it was limited before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does in my testing, buy maybe @skjindal93 can confirm. I was the one that put the original limitation in just because I was only working with APIs. It may have not been needed even then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. includeInactive works entity type agnostic. Can be used with any of the entity types

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #719 (bf5b9b7) into main (90d31a5) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #719   +/-   ##
=======================================
  Coverage   85.15%   85.15%           
=======================================
  Files         784      784           
  Lines       16064    16064           
  Branches     1997     1997           
=======================================
  Hits        13680    13680           
  Misses       2351     2351           
  Partials       33       33           
Impacted Files Coverage Δ
...ery/entity/entity-graphql-query-handler.service.ts 56.00% <ø> (ø)
...ions/interactions-graphql-query-handler.service.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90d31a5...bf5b9b7. Read the comment docs.

@github-actions

This comment has been minimized.

@aaron-steinfeld aaron-steinfeld dismissed their stale review March 25, 2021 11:38

Failing tests

@aaron-steinfeld
Copy link
Contributor

So the failing test reminds me - we probably don't want this flag on for things that use the entity query handler like fetching topology or interactions data - can we make it configurable defaulting to true?

@github-actions

This comment has been minimized.

@jake-bassett jake-bassett merged commit 17dddb5 into main Mar 25, 2021
@jake-bassett jake-bassett deleted the entity-id-queries-always-include-inactive branch March 25, 2021 17:52
@github-actions
Copy link

Unit Test Results

    4 files  ±0  245 suites  ±0   15m 17s ⏱️ +31s
878 tests ±0  878 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
882 runs  ±0  882 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 17dddb5. ± Comparison against base commit 90d31a5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants