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

Better stats #70

Merged
merged 3 commits into from
Jun 28, 2022
Merged

Better stats #70

merged 3 commits into from
Jun 28, 2022

Conversation

rowanseymour
Copy link
Member

@rowanseymour rowanseymour commented Jun 28, 2022

Return the number of archives that we fail to create, don't over report records archived

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2022

Codecov Report

Merging #70 (8425a18) into main (6e1a376) will increase coverage by 0.12%.
The diff coverage is 61.76%.

@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   66.99%   67.11%   +0.12%     
==========================================
  Files           6        6              
  Lines         815      815              
==========================================
+ Hits          546      547       +1     
- Misses        165      166       +1     
+ Partials      104      102       -2     
Impacted Files Coverage Δ
archives/archives.go 66.94% <61.76%> (+0.21%) ⬆️

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 6e1a376...8425a18. Read the comment docs.

@@ -758,23 +751,27 @@ func createArchive(ctx context.Context, db *sqlx.DB, config *Config, s3Client s3
return nil
}

func createArchives(ctx context.Context, db *sqlx.DB, config *Config, s3Client s3iface.S3API, org Org, archives []*Archive) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

this method can't actually error

@rowanseymour rowanseymour marked this pull request as ready for review June 28, 2022 13:34
if err != nil {
log.WithError(err).WithField("archive_type", MessageType).Error("error archiving org messages")
}
totalMsgsArchived += countRecords(created)
Copy link
Member Author

Choose a reason for hiding this comment

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

because dailies and monthlies are combined here, this double counts records archived

assert.Equal(t, int64(23), created[62].Size)
assert.Equal(t, "f0d79988b7772c003d04a28bd7417a62", created[62].Hash)

// no rollup for october since that had one invalid daily archive
Copy link
Member Author

Choose a reason for hiding this comment

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

despite what this comment claims, the test data doesn't have any failing messages

@rowanseymour rowanseymour merged commit 8e5263d into main Jun 28, 2022
@rowanseymour rowanseymour deleted the better_stats branch June 28, 2022 14:50
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