Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only call GetJobSetEvents once #2442

Merged
merged 8 commits into from
May 10, 2023
Merged

Only call GetJobSetEvents once #2442

merged 8 commits into from
May 10, 2023

Conversation

kannon92
Copy link
Contributor

@kannon92 kannon92 commented May 9, 2023

When using a GRPC stream you should get the stream and then start looping over that. Calling it a bunch is not ideal.

This is a POC for right now to test out if this actually works.

Thanks @d80tb7

┆Issue is synchronized with this Jira Task by Unito

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 66.66% and no project coverage change.

Comparison is base (95dbf79) 58.48% compared to head (5775ac0) 58.48%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2442   +/-   ##
=======================================
  Coverage   58.48%   58.48%           
=======================================
  Files         234      234           
  Lines       29239    29241    +2     
=======================================
+ Hits        17099    17103    +4     
+ Misses      10827    10826    -1     
+ Partials     1313     1312    -1     
Flag Coverage Δ
armada-server 58.48% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/jobservice/events/client.go 21.95% <50.00%> (+0.26%) ⬆️
internal/jobservice/eventstojobs/eventstojobs.go 73.95% <72.72%> (-2.39%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@richscott richscott left a comment

Choose a reason for hiding this comment

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

Just a quick question about logging in one place, otherwise I think it looks good.

@@ -82,6 +82,17 @@ func (eventToJobService *EventsToJobService) streamCommon(ctx context.Context, t
}
}()

log.Infof("GetJobEventMessage for %s/%s with id %s", eventToJobService.queue, eventToJobService.jobSetId, fromMessageId)
Copy link
Member

Choose a reason for hiding this comment

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

Are Daniele and/or others comfortable with info-level logging on this, or would they prefer it to be debug-level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it would be fine as this should only be once every subscribe. But we can always mess around with this.

Copy link
Contributor

@ClifHouck ClifHouck left a comment

Choose a reason for hiding this comment

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

LGTM, though I echo Rich's comment on possibly lowering the log-level for every message to debug.

@kannon92 kannon92 enabled auto-merge (squash) May 10, 2023 19:24
@kannon92 kannon92 merged commit 0701e0b into master May 10, 2023
23 of 24 checks passed
@owenthomas17 owenthomas17 deleted the jobsetevents branch August 25, 2023 14:27
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.

None yet

4 participants