Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@sandreim
Copy link
Contributor

@sandreim sandreim commented Jun 21, 2022

Fixes #5664.

The initial implementation (introduced in 0.9.16) was not handling errors correctly - effectively bailing out when we're no longer a validator - see here. This used to work fine until 8bb84d2 because it was always done against determine_relevant_authorities output which includes the validators from past sessions, while the secondary check inside the update code would check against current session (the new session). The mentioned change introduces topology changes that make the initial check to be performed on the current session authorities only, resulting in not updating the metrics to 0 when a validator is removed from the active set.

@github-actions github-actions bot added the A3-in_progress Pull request is in progress. No review needed at this stage. label Jun 21, 2022
@sandreim sandreim added B1-releasenotes C1-low PR touches the given topic and has a low impact on builders. labels Jun 21, 2022
sandreim added 2 commits June 21, 2022 13:19
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
@sandreim sandreim marked this pull request as ready for review June 21, 2022 14:16
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Jun 21, 2022
@sandreim sandreim requested a review from vstakhov June 21, 2022 14:16
@sandreim sandreim added B0-silent Changes should not be mentioned in any release notes and removed B1-releasenotes labels Jun 21, 2022
Copy link
Contributor

@vstakhov vstakhov left a comment

Choose a reason for hiding this comment

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

Looks good in general, some minor neats might be applied if relevant

Signed-off-by: Andrei Sandu <[email protected]>
@sandreim
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 5a619f0 into master Jun 22, 2022
@paritytech-processbot paritytech-processbot bot deleted the sandreim/fix_authority_metric branch June 22, 2022 09:10
ordian pushed a commit that referenced this pull request Jun 28, 2022
* master:
  zombienet: try to fix parachains upgrade test (#5724)
  Update dependencies (companion for substrate#11722) (#5731)
  Update metric name and doc (#5716)
  Bump reqwest from 0.11.10 to 0.11.11 (#5732)
  add release-engineering to CI files' reviewers (#5733)
  Bump parity-scale-codec from 3.1.2 to 3.1.5 (#5720)
  Add checklist item (#5715)
  Fix 5560: add support for a new `staking-miner info` command (#5577)
  Bump `wasmtime` to 0.38.0 and `zstd` to 0.11.2 (companion for substrate#11720) (#5707)
  pvf: ensure enough stack space (#5712)
  Bump generic-array from 0.12.3 to 0.12.4 in /bridges/fuzz/storage-proof (#5648)
  pvf: unignore `terminates_on_timeout` test (#5722)
  Bump proc-macro2 from 1.0.39 to 1.0.40 (#5719)
  pass $COMPANION_OVERRIDES to check_dependent_project (#5708)
  Bump thread_local from 1.1.0 to 1.1.4 in /bridges/fuzz/storage-proof (#5687)
  Bump quote from 1.0.18 to 1.0.19 (#5700)
  Rococo: add new pallet-beefy-mmr API (companion for substrate#11406) (#5516)
  Update metric before bailing out (#5706)
  Add publish docker staking-miner (#5710)
@stakeworld
Copy link
Contributor

Hi @sandreim, do you know if the update made it to the v0.9.25 release? The metric still seems to stay on 1 in this release.

@ordian
Copy link

ordian commented Jul 7, 2022

@stakeworld it did not make it into 0.9.25, but will be included in 0.9.26

@stakeworld
Copy link
Contributor

Thanks for the quick update!

al3mart pushed a commit that referenced this pull request Jul 14, 2022
* Update authority metrics before bailing out

Signed-off-by: Andrei Sandu <[email protected]>

* remove redundant call

Signed-off-by: Andrei Sandu <[email protected]>

* doc

Signed-off-by: Andrei Sandu <[email protected]>

* review feedback

Signed-off-by: Andrei Sandu <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prometheus endpoint "polkadot_node_is_authority" does not switch back when getting out of the active set

4 participants