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

report MOAB_NOT_FOUND errors to honeybadger #1532

Merged
merged 1 commit into from
May 13, 2020

Conversation

ndushay
Copy link
Contributor

@ndushay ndushay commented May 12, 2020

[HOLD] - waiting for @jmartin-sul to ponder my comment ( #1483#issuecomment-627583503) on issue #1483

Why was this change made?

To report MOAB_NOT_FOUND errors to Honeybadger.

Fixes #1483

Was the usage documentation (e.g. wiki, README, queue or DB specific README) updated?

na

Does this change affect how this application integrates with other services?

nope

Copy link
Member

@jmartin-sul jmartin-sul left a comment

Choose a reason for hiding this comment

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

one suggestion for an allow that might be made more specific, but i'd also be fine merging this as-is considering the other testing. up to you, feel free to merge if you don't think the suggestion is worth following up on.

instance_double(Dor::Services::Client::Object, events: events_client)
)
allow(Honeybadger).to receive(:notify).with(Regexp.new(hb_exp_msg))
allow(events_client).to receive(:create).with(type: 'preservation_audit_failure', data: instance_of(Hash))
Copy link
Member

Choose a reason for hiding this comment

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

i think the reporting functionality is pretty well tested, so this might not be worth it, but... what about putting these allow statements in the specific contexts for the MOAB_NOT_FOUND tests, so this fairly specific set of allows isn't applied to all the tests in this spec file? from a quick read through the spec file, this looks to me like the contexts on line 96 and line 456 would be the directly relevant ones. but if there are more, and this is onerous, i wouldn't hold up merge for it. though if you were up for trying it, and if it didn't work, i'd be curious about any other unexpected test failures.

(tangentially, i'm not sure why the context on line 456 (moab not found) is nested in the context on line 421 (catalog version > moab version), since the moab not being on disk seems to mean there is no version for the moab, but whatever, def outside the scope of this change, just a thing that surprised me slightly)

@ndushay ndushay force-pushed the moab-not-found-honeybadger-results branch from 01291ea to 717e50f Compare May 13, 2020 16:48
@codeclimate
Copy link

codeclimate bot commented May 13, 2020

Code Climate has analyzed commit 717e50f and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (97% is the threshold).

This pull request will bring the total coverage in the repository to 98.1% (0.0% change).

View more on Code Climate.

@ndushay ndushay merged commit 0cae63d into master May 13, 2020
@ndushay ndushay deleted the moab-not-found-honeybadger-results branch May 13, 2020 16:50
@ndushay ndushay changed the title [HOLD] report MOAB_NOT_FOUND errors to honeybadger report MOAB_NOT_FOUND errors to honeybadger May 13, 2020
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.

MOAB_NOT_FOUND should probably be in the AuditResults::HONEYBADGER_REPORT_CODES list?
2 participants