Skip to content

Conversation

@mkysel
Copy link
Collaborator

@mkysel mkysel commented Sep 2, 2025

Parsing --paused false did not work. Clearly it can not be used with required. It always parsed to TRUE.

Testnet still does not work...

@mkysel mkysel requested a review from a team as a code owner September 2, 2025 20:16
@graphite-app
Copy link

graphite-app bot commented Sep 2, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@macroscopeapp
Copy link

macroscopeapp bot commented Sep 2, 2025

Accept multiple true/false synonyms for the CLI paused flag in pkg/config.SetPauseOptions.Paused for the PAUSED workflow

  • Introduce PausedFlag with parsing for true|1|yes|on and false|0|no|off and switch SetPauseOptions.Paused to use it in cliOptions.go, updating CLI usage to call options.SetPause.Paused.Bool() in main.go.
  • Replace substring error checks with err.IsNoChange() in appChainAdmin.SetIdentityUpdatePauseStatus and appChainAdmin.SetGroupMessagePauseStatus in appchainAdmin.go.
  • Change ParameterAdmin getters and setters to return ProtocolError and wrap contract errors via NewBlockchainError in parameterAdmin.go.
  • Add tests for pause-related no-op and parameter bool behavior in parameterAdmin_test.go and fix error variable shadowing in appchainAdmin_test.go.

📍Where to Start

Start with the setPause flow in main.go and follow calls into appChainAdmin in appchainAdmin.go.


Macroscope summarized 5f6d922.

Comment on lines +135 to +156
const (
PausedTrue PausedFlag = true
PausedFalse PausedFlag = false
)

func (p *PausedFlag) UnmarshalFlag(v string) error {
switch v {
case "true", "1", "yes", "on":
*p = PausedTrue
return nil
case "false", "0", "no", "off":
*p = PausedFalse
return nil
default:
return fmt.Errorf("invalid paused value %q (allowed: true|false)", v)
}
}

func (p *PausedFlag) Bool() bool {
return bool(*p)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Time to migrate to spf13/cobra...

@mkysel mkysel merged commit cd68990 into main Sep 2, 2025
10 checks passed
@mkysel mkysel deleted the mkysel/minor branch September 2, 2025 20:43
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.

3 participants