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

Persist imix output through connection failuers #328

Merged
merged 8 commits into from
Oct 16, 2023

Conversation

hulto
Copy link
Collaborator

@hulto hulto commented Oct 16, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

  • This ensures that even if some callbacks fail imix output is saved locally until it's safely sent to the Tavern server

Which issue(s) this PR fixes:

Fixes #305

@hulto hulto added bug Something isn't working imix labels Oct 16, 2023
@hulto hulto linked an issue Oct 16, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #328 (87f6632) into main (53111f9) will increase coverage by 0.05%.
The diff coverage is 86.48%.

@@            Coverage Diff             @@
##             main     #328      +/-   ##
==========================================
+ Coverage   74.57%   74.63%   +0.05%     
==========================================
  Files          96       96              
  Lines        6380     6402      +22     
==========================================
+ Hits         4758     4778      +20     
- Misses       1535     1537       +2     
  Partials       87       87              
Files Coverage Δ
implants/imix/src/main.rs 78.45% <86.48%> (+0.51%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hulto hulto requested a review from jabbate19 October 16, 2023 01:25
implants/imix/src/main.rs Outdated Show resolved Hide resolved
Comment on lines 396 to 399
if loop_count_max.is_some() {
loop_count += 1;
if (loop_count >= loop_count_max.context("loop_count_max shouldn't be None")?) { return Ok(()); };
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this can get rewritten using if let

if let Some(count_max) = loop_count_max {
    loop_count += 1;
    if loop_count >= count_max {
        return Ok(())
    }
} else {
    // Handle it being None
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oooh that is cleaner 🙌

@hulto hulto requested a review from jabbate19 October 16, 2023 11:43
Copy link
Collaborator

@jabbate19 jabbate19 left a comment

Choose a reason for hiding this comment

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

:shipit:

@hulto hulto merged commit c88eb67 into main Oct 16, 2023
8 checks passed
@hulto hulto deleted the 305-imix-reporting-doesnt-hold-output-until-it-reconnects branch October 16, 2023 19:17
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
Persist imix output through connection failuers (#328)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working imix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imix reporting doesn't hold output until it reconnects.
2 participants