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

update table references, use wrapf for errors #34

Merged
merged 1 commit into from
Jul 25, 2019

Conversation

nicpottier
Copy link
Contributor

We broke deleting of runs when we removed run_id from webhook_event and webhook_result.

@nicpottier nicpottier requested a review from rowanseymour July 25, 2019 14:36
@@ -336,13 +332,6 @@ func BuildRollupArchive(ctx context.Context, db *sqlx.DB, conf *Config, s3Client

start := time.Now()

log := logrus.WithFields(logrus.Fields{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

logging is the responsibility of the parent that doesn't pass the error up.

var exitedOn *time.Time
for rows.Next() {
if archive.ArchiveType == MessageType {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

MessageType block was never entered, when we added broadcast deleting we changed to our own method.


// then add in daily archives taking into account the monthly that have been built
Copy link
Contributor Author

Choose a reason for hiding this comment

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

DRY

const deleteRecentRuns = `
DELETE FROM flows_flowpathrecentrun
WHERE run_id IN(?)
`

const deleteActionLogs = `
DELETE FROM flows_actionlog
WHERE run_id IN(?)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Table still exists but shouldn't be any runs in it.

@codecov-io
Copy link

codecov-io commented Jul 25, 2019

Codecov Report

Merging #34 into master will increase coverage by 1.72%.
The diff coverage is 16.94%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #34      +/-   ##
=========================================
+ Coverage   68.08%   69.8%   +1.72%     
=========================================
  Files           3       3              
  Lines         943     891      -52     
=========================================
- Hits          642     622      -20     
+ Misses        181     156      -25     
+ Partials      120     113       -7
Impacted Files Coverage Δ
archiver.go 69.53% <16.94%> (+1.97%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a79b3a...cf942eb. Read the comment docs.

@nicpottier nicpottier merged commit 0175510 into master Jul 25, 2019
@nicpottier nicpottier deleted the errors-and-tables branch July 25, 2019 18:04
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