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

Deprecate local mode #725

Merged
merged 1 commit into from
Dec 29, 2021
Merged

Deprecate local mode #725

merged 1 commit into from
Dec 29, 2021

Conversation

fishmonger45
Copy link
Contributor

@fishmonger45 fishmonger45 commented Dec 28, 2021

Deprecates local mode with warning. Also adds strictOptions() to getYargsOptions to early exist when given invalid options. Here is a trace of an invalid option provided:

[nodemon] starting `node -r dotenv/config -r tsconfig-paths/register -r ts-node/register src/main.ts --force-clean -f /home/wqsz7xn/Desktop/subql-dictionary --local --fake-opt`
Options:
      --help                Show help                                  [boolean]
      --version             Show version number                        [boolean]
  -f, --subquery            Local path of the subquery project          [string]
      --subquery-name       Name of the subquery project   [deprecated] [string]
  -c, --config              Specify configuration file                  [string]
      --local               Use local mode                [deprecated] [boolean]
      --force-clean         Force clean the database, dropping project schemas
                            and tables                                 [boolean]
      --db-schema           Db schema name of the project               [string]
      --unsafe              Allows usage of any built-in module within the
                            sandbox                                    [boolean]
      --batch-size          Batch size of blocks to fetch in one round  [number]
      --scale-batch-size    scale batch size based on memory usage
                                                      [boolean] [default: false]
      --timeout             Timeout for indexer sandbox to execute the mapping
                            functions                                   [number]
      --debug               Show debug information to console output. will
                            forcefully set log level to debug
                                                      [boolean] [default: false]
      --profiler            Show profiler information to console output
                                                      [boolean] [default: false]
      --network-endpoint    Blockchain network endpoint to connect      [string]
      --output-fmt          Print log as json or plain text
                                           [string] [choices: "json", "colored"]
      --log-level           Specify log level to print. Ignored when --debug is
                            used
          [string] [choices: "fatal", "error", "warn", "info", "debug", "trace",
                                                                       "silent"]
      --migrate             Migrate db schema (for management tables only)
                                                      [boolean] [default: false]
      --timestamp-field     Enable/disable created_at and updated_at in schema
                                                      [boolean] [default: false]
  -d, --network-dictionary  Specify the dictionary api for this network [string]
  -m, --mmr-path            Local path of the merkle mountain range (.mmr) file
                                                                        [string]
      --proof-of-index      Enable/disable proof of index
                                                      [boolean] [default: false]
  -p, --port                The port the service will bind to
                                                        [number] [default: 3000]

Unknown arguments: fake-opt, fakeOpt

Todo:

  • Deprecate --local
  • Remove local mode from each of our starter projects docker images
  • Inform folks on discord of the change

@ianhe8x ianhe8x merged commit ab1a2a0 into main Dec 29, 2021
@ianhe8x ianhe8x deleted the deprecate-local-mode branch December 29, 2021 22:35
bz888 pushed a commit that referenced this pull request Jun 3, 2022
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