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 logging issues in stellar-etl writing to airflow #281

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

chowbao
Copy link
Contributor

@chowbao chowbao commented Aug 30, 2024

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with the jira ticket associated with the PR.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated the README with the added features, breaking changes, new instructions on how to use the repository. I updated the description of the fuction with the changes that were made.

Release planning

  • I've decided if this PR requires a new major/minor/patch version accordingly to
    semver, and I've changed the name of the BRANCH to release/_ , feature/_ or patch/* .

What

Updated some of the cmdLogger message types to error out properly when running stellar-etl in airflow.

cmdLogger.Error/Errorf does not actually return a status as failure from airflow's perspective. So these "errors" don't mark an airflow task as a failure. Only when an Error is coupled with cmdLogger.LogError or cmdLogger.Fatal/Fatalf will the airflow task be marked as failed.

Why

Fix the logging issues when running stellar-etl in airflow.

Known limitations

N/A

@chowbao chowbao requested a review from a team as a code owner August 30, 2024 19:51
Comment on lines +131 to +134
// Skip LedgerEntryTypeData as we are intentionally not processing it
if change.Type != xdr.LedgerEntryTypeData {
logger.Infof("change type: %v not tracked", change.Type)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated to the error issue. This is just to log less spam in our output

@chowbao chowbao merged commit 5d714dd into master Aug 30, 2024
8 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.

2 participants