Skip to content

Conversation

@mabdh
Copy link
Member

@mabdh mabdh commented Jun 7, 2022

No description provided.

@mabdh mabdh linked an issue Jun 7, 2022 that may be closed by this pull request
@mabdh mabdh force-pushed the gettypes-postgres branch from 46d7a54 to d58cad0 Compare June 7, 2022 10:29
@coveralls
Copy link

coveralls commented Jun 7, 2022

Pull Request Test Coverage Report for Build 2473444980

  • 54 of 132 (40.91%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.9%) to 80.253%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/server/v1beta1/type.go 10 14 71.43%
internal/store/postgres/asset_repository.go 27 37 72.97%
core/asset/filter.go 0 64 0.0%
Totals Coverage Status
Change from base Build 2453767429: -0.9%
Covered Lines: 4503
Relevant Lines: 5611

💛 - Coveralls

@mabdh mabdh force-pushed the gettypes-postgres branch from d58cad0 to 3ee3d13 Compare June 7, 2022 11:16
@mabdh mabdh marked this pull request as ready for review June 8, 2022 01:57
@mabdh mabdh requested a review from StewartJingga June 8, 2022 01:58
Copy link
Contributor

@StewartJingga StewartJingga left a comment

Choose a reason for hiding this comment

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

If count is 0, the field is not being sent. It is fine for grpc calls, but for HTTP(json) calls, the response will be not as informative.

One approach we can use is to tweak our grpc json marshaller to not omit empty here.
example

gwmux := runtime.NewServeMux(
	runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{
		MarshalOptions: protojson.MarshalOptions{
			UseProtoNames: true,
			EmitUnpopulated: true,
		},
	}),
)

wdyt @mabdh ?

@mabdh
Copy link
Member Author

mabdh commented Jun 10, 2022

@StewartJingga yes that should be fine

@mabdh mabdh requested a review from StewartJingga June 10, 2022 09:38
Copy link
Contributor

@StewartJingga StewartJingga left a comment

Choose a reason for hiding this comment

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

LGTM

@ravisuhag ravisuhag merged commit 526edc0 into main Jun 10, 2022
@ravisuhag ravisuhag deleted the gettypes-postgres branch June 10, 2022 11:11
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.

Moving GetTypes from fetching from elasticsearch to fetching from postgres

5 participants