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

Fix log for archival #5819

Conversation

davidporter-id-au
Copy link
Member

What changed?
The log to work out what's nonretriable is not logged

Why?

How did you test it?

Potential risks

Release notes

Documentation Changes

@davidporter-id-au davidporter-id-au changed the title Fix log Fix log for archival Mar 26, 2024
@davidporter-id-au davidporter-id-au marked this pull request as ready for review March 26, 2024 05:49
@davidporter-id-au davidporter-id-au enabled auto-merge (squash) March 26, 2024 05:50
@coveralls
Copy link

coveralls commented Mar 26, 2024

Pull Request Test Coverage Report for Build 018e809c-3d58-41a7-b684-2d08f136e522

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • 52 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.01%) to 65.267%

Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 77.62%
service/history/task/transfer_standby_task_executor.go 2 87.01%
common/persistence/historyManager.go 2 66.67%
common/persistence/statsComputer.go 3 96.07%
common/task/fifo_task_scheduler.go 4 83.51%
common/persistence/nosql/nosqlplugin/cassandra/workflow_parsing_utils.go 12 87.81%
service/history/execution/mutable_state_task_refresher.go 28 59.81%
Totals Coverage Status
Change from base Build 018e7c9c-9c0b-4566-b2d3-1fdc482709dd: -0.01%
Covered Lines: 95400
Relevant Lines: 146169

💛 - Coveralls

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Merging #5819 (f89dab6) into master (54b54b6) will decrease coverage by 0.25%.
The diff coverage is 100.00%.

❗ Current head f89dab6 differs from pull request most recent head e1b75c9. Consider uploading reports for the commit e1b75c9 to get more accurate results

Additional details and impacted files
Files Coverage Δ
service/worker/archiver/activities.go 97.16% <100.00%> (+0.16%) ⬆️

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@@ -89,11 +89,17 @@ func uploadHistoryActivity(ctx context.Context, request ArchiveRequest) (err err
if err == nil {
return nil
}
if err.Error() == errUploadNonRetriable.Error() {
logger.Error(carchiver.ArchiveNonRetriableErrorMsg, tag.ArchivalArchiveFailReason("got non-retryable error from history archiver"))
if errors.Is(err, errUploadNonRetriable) {
Copy link
Member

@Groxx Groxx Mar 26, 2024

Choose a reason for hiding this comment

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

Superfically seems fine, but to double check: are we returning that exact error value?
Comparing strings is a looser check in many common ways, so generally this would be less likely to be true than it was before. Since I don't think we have wrapped errors here. (Or do we? This looks isolated enough that it seems possible anyway)

Copy link
Member Author

@davidporter-id-au davidporter-id-au Mar 26, 2024

Choose a reason for hiding this comment

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

I don't know what error we're returning because the log isn't showing anything useful, it's not got the error tag

Copy link
Member Author

Choose a reason for hiding this comment

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

I did check this is coverd by a unit test before changing the errors.Is, I could remove it if it's a concern, but I don't really see a lot of values in jsut string comparing like this

Copy link
Contributor

@3vilhamster 3vilhamster left a comment

Choose a reason for hiding this comment

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

Since it is affecting only staging, maybe you could merge this from your custom branch to verify if it resolves the issues/helps identifying the root cause?

@davidporter-id-au davidporter-id-au merged commit 08e8553 into cadence-workflow:master Mar 27, 2024
18 checks passed
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.

4 participants