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

Work around some mgr:forward accounting/reporting bugs #1969

Conversation

rousskov
Copy link
Contributor

@rousskov rousskov commented Dec 23, 2024

In modern code, FwdReplyCodes[0][i] is usually zero because n_tries is
usually at least one at logReplyStatus() call time. This leads to
mgr:forward report showing nothing but table heading (i.e. no stats)

Also improve try#N heading:data match by skipping FwdReplyCodes[0]
reporting (there is still no try#0 heading) and adding a previously
missing try#9 heading

In modern code, FwdReplyCodes[0][i] is usually zero because n_tries is
usually at least one at logReplyStatus() call time.

Also improve `try#N` heading/data match by skipping FwdReplyCodes[0]
reporting (there is still no `try#0` heading) and adding a previously
missing `try#9` heading.
@rousskov
Copy link
Contributor Author

I do not like that this change hides (rare) try#0 counters, but it is probably better than reporting no counters at all.

A proper fix would require significant refactoring. It should be done, but I do not have the time for that right now.

Please see the following squid-users thread for context: https://lists.squid-cache.org/pipermail/squid-users/2024-December/027333.html

@rousskov rousskov added the S-waiting-for-more-reviewers needs a reviewer and/or a second opinion label Dec 23, 2024
@rousskov
Copy link
Contributor Author

This change has been confirmed as working by the bug reporter.

@rousskov rousskov added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels S-could-use-an-approval An approval may speed this PR merger (but is not required) and removed S-waiting-for-more-reviewers needs a reviewer and/or a second opinion labels Dec 24, 2024
src/FwdState.cc Show resolved Hide resolved
squid-anubis pushed a commit that referenced this pull request Dec 25, 2024
In modern code, FwdReplyCodes[0][i] is usually zero because n_tries is
usually at least one at logReplyStatus() call time. This leads to
mgr:forward report showing nothing but table heading (i.e. no stats).

Also improve `try#N` heading/data match by skipping FwdReplyCodes[0]
reporting (there is still no `try#0` heading) and adding a previously
missing `try#9` heading.
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 25, 2024
@rousskov rousskov removed the S-could-use-an-approval An approval may speed this PR merger (but is not required) label Dec 27, 2024
@kinkie kinkie removed the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 29, 2024
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 29, 2024
@kinkie
Copy link
Contributor

kinkie commented Dec 29, 2024

ok to test

@kinkie kinkie removed the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 29, 2024
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 29, 2024
@rousskov
Copy link
Contributor Author

squid-anubis added the M-waiting-staging-checks label 4 days ago

kinkie removed the M-waiting-staging-checks label 5 hours ago
squid-anubis added the M-waiting-staging-checks label 5 hours ago

kinkie removed the M-waiting-staging-checks label 5 minutes ago
squid-anubis added the M-waiting-staging-checks label 4 minutes ago

@kinkie, M-waiting-staging-checks label is managed by Anubis and is simply reflecting (Anubis interpretation of) PR state. Just removing that label from a live PR is unlikely to solve any problems -- in most cases, Anubis will simply restore the label when it gets a chance.

I did not check any details, but perhaps Anubis is waiting for more staging tests to start? Perhaps its configuration got out of sync with our set of tests again? Please let me know if you need my help with anything related to the above label changes.

@kinkie
Copy link
Contributor

kinkie commented Dec 29, 2024 via email

@kinkie
Copy link
Contributor

kinkie commented Dec 29, 2024

OK to test

squid-anubis pushed a commit that referenced this pull request Dec 29, 2024
In modern code, FwdReplyCodes[0][i] is usually zero because n_tries is
usually at least one at logReplyStatus() call time. This leads to
mgr:forward report showing nothing but table heading (i.e. no stats).

Also improve `try#N` heading:data match by skipping FwdReplyCodes[0]
reporting (there is still no `try#0` heading) and adding a previously
missing `try#9` heading.
@rousskov
Copy link
Contributor Author

rousskov commented Dec 29, 2024

I'm now trying to get Anubis to redo the staging checks ... What is the best way to do it?

Anubis does not do staging checks. GitHub (and Jenkins?) test a commit staged by Anubis.

To redo staging tests, consider these basic minimally-invasive options:

  • Use GitHub (and Jenkins?) UI to restart any test for the existing staged commit.
  • Change staged commit input (e.g., PR description) a bit to force Anubis to regenerate a staged commit.

I have now done the latter.

@rousskov
Copy link
Contributor Author

I see no changes in staged commit checks performed for the last two staged commits; they both show 89 checks.

@kinkie
Copy link
Contributor

kinkie commented Dec 30, 2024

  • Use GitHub (and Jenkins?) UI to restart any test for the existing staged commit.

The problem here is that the CodeQL test is not even started, and I can see no way to make it work because somewhere somewhere it still expects to find it in default.yaml

  • Change staged commit input (e.g., PR description) a bit to force Anubis to regenerate a staged commit.

I have now done the latter.

Thanks.

@squid-anubis squid-anubis added M-failed-staging-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Dec 30, 2024
@rousskov
Copy link
Contributor Author

The problem here is that the CodeQL test is not even started, and I can see no way to make it work because somewhere somewhere it still expects to find it in default.yaml

AFAICT, "the CodeQL test is not even started" is not a relevant problem: That problem existed for a long time. I first whined about it to you on Zulip in October 2024. PRs have been merging successfully while that problem was present, of course. I speculate that something broke CI (in relevant ways) during very recent attempts to land #1971. I have not investigated what happened.

@kinkie
Copy link
Contributor

kinkie commented Dec 30, 2024

The problem here is that the CodeQL test is not even started, and I can see no way to make it work because somewhere somewhere it still expects to find it in default.yaml

AFAICT, "the CodeQL test is not even started" is not a relevant problem: That problem existed for a long time. I first whined about it to you on Zulip in October 2024. PRs have been merging successfully while that problem was present, of course. I speculate that something broke CI (in relevant ways) during very recent attempts to land #1971. I have not investigated what happened.

No, PR #1971 was my attempt to address CodeQL errors - see https://github.com/squid-cache/squid/pull/1969/checks?check_run_id=34801150013 . The error message can't be found online, but it seems to imply that some CodeQL configurations are left connected to the branch inside GitHub's systems; all I've been trying to do in the past couple of days has been to figure out how to remove that reference, restore it, or reset it. So far, unsuccessfully.

@rousskov
Copy link
Contributor Author

AFAICT, despite starting with the word "No", your response does not contradict my observations and speculations.

@kinkie kinkie removed the M-failed-staging-other https://github.com/measurement-factory/anubis#pull-request-labels label Dec 31, 2024
squid-anubis pushed a commit that referenced this pull request Dec 31, 2024
In modern code, FwdReplyCodes[0][i] is usually zero because n_tries is
usually at least one at logReplyStatus() call time. This leads to
mgr:forward report showing nothing but table heading (i.e. no stats)

Also improve `try#N` heading:data match by skipping FwdReplyCodes[0]
reporting (there is still no `try#0` heading) and adding a previously
missing `try#9` heading
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Dec 31, 2024
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-merged https://github.com/measurement-factory/anubis#pull-request-labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants