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(ci): In config tests, look for the config being successfully loaded by Zebra #7900

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Nov 3, 2023

Motivation

Zebra's configuration loading tests are checking for the file name of the config in any log. But since the entrypoint script also logs the file name, the test can pass before Zebra starts to run:
https://github.com/ZcashFoundation/zebra/actions/runs/6734364310/job/18305634496#step:5:226

(The red highlight shows grep finding the success pattern, and then Docker gets stopped.)

Instead, we should check for the log line that loads the config.

This bug doesn't have a ticket, but it blocks this release checklist item in ticket #7764:

Wait until the Docker binaries have been built on main, and the quick tests have passed.

PR Author Checklist

Check before marking the PR as ready for review:

  • Will the PR name make sense to users? This is an internal CI test coverage bug.
  • Does the PR have a priority label?
  • Have you added or updated tests?
  • Is the documentation up to date? No doc updates required.

Not a significant change.

Complex Code or Requirements

We need to add some wildcards to the log line, to ignore terminal formatting characters.

Solution

  • Make the test pass when Zebra successfully loads the config file, rather than when any process logs the name of the file

Testing

Manually inspect the CI logs for Zebra running and logging the config line.

Review

This is possibly a release blocker (but only if config loading is actually broken).

Reviewer Checklist

Check before approving the PR:

  • Does the PR scope match the ticket?
    • Note: There is no ticket, this bug blocks the Docker release tests
  • Are there enough tests to make sure it works? Do the tests cover the PR motivation?
  • Are all the PR blockers dealt with?
    PR blockers can be dealt with in new tickets or PRs.

And check the PR Author checklist is complete.

@teor2345 teor2345 added C-bug Category: This is a bug P-Critical 🚑 C-testing Category: These are tests C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Nov 3, 2023
@teor2345 teor2345 self-assigned this Nov 3, 2023
@teor2345 teor2345 requested a review from a team as a code owner November 3, 2023 00:22
@teor2345 teor2345 requested review from oxarbitrage and removed request for a team November 3, 2023 00:22
@teor2345
Copy link
Contributor Author

teor2345 commented Nov 3, 2023

Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

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

The change makes sense, it is hard to see what the grep regex is doing but i will approve based on this: #7900 (comment)

@mergify mergify bot merged commit f836f7f into main Nov 3, 2023
@mergify mergify bot deleted the fix-ci-conf branch November 3, 2023 14:41
@teor2345 teor2345 mentioned this pull request Nov 5, 2023
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug C-testing Category: These are tests C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants