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

Emit "VariableEmitted" on adding new variable in a test step #140

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

rihter007
Copy link
Contributor

No description provided.

@rihter007 rihter007 force-pushed the feature/emit_variable_events branch from 2e75573 to 488f887 Compare August 22, 2022 16:01
@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2022

Codecov Report

Merging #140 (b67c475) into main (5b8e421) will increase coverage by 0.03%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   63.38%   63.41%   +0.03%     
==========================================
  Files         164      164              
  Lines       10284    10304      +20     
==========================================
+ Hits         6518     6534      +16     
  Misses       3045     3045              
- Partials      721      725       +4     
Flag Coverage Δ
e2e 49.18% <21.87%> (-0.04%) ⬇️
integration 54.57% <21.87%> (-0.09%) ⬇️
unittests 48.91% <75.00%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
pkg/runner/test_runner.go 87.81% <55.55%> (-2.31%) ⬇️
pkg/runner/step_state.go 88.57% <100.00%> (ø)
pkg/runner/test_steps_variables.go 65.85% <100.00%> (+1.75%) ⬆️
pkg/jobmanager/jobmanager.go 78.02% <0.00%> (+1.09%) ⬆️
plugins/teststeps/waitport/waitport.go 70.45% <0.00%> (+1.51%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rihter007 rihter007 force-pushed the feature/emit_variable_events branch from 488f887 to b67c475 Compare August 22, 2022 19:44
}

stepOutputs, err := newTestStepsVariables(t.TestStepsBundles, func(tgtID string, stepLabel string, name string, value json.RawMessage) {
emitter := emitterForStep[stepLabel]
Copy link
Member

Choose a reason for hiding this comment

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

this callback ends up being called by multiple goroutines handling the steps/targets, right? this read should be sync'd somehow; it's not happening at the callsite in testStepsVariables.Add either (even if it's now just a readonly, there's no guarantee something might not change this map)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is true, but all access is read only, so should be fine

Copy link
Member

Choose a reason for hiding this comment

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

note the thing i wrote in parens

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 agree, but currently the map and its usage is located nearby in terms of LoCs, so I would not overcomplicate for possible future safety

@rihter007
Copy link
Contributor Author

Let's fix #84 first

@rihter007 rihter007 merged commit 64a626c into main Dec 13, 2022
@xaionaro xaionaro deleted the feature/emit_variable_events branch December 13, 2022 16:38
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