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

services/horizon: Add deprecation warning for using command-line flags #5051

Merged
merged 24 commits into from
Oct 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
43b55ca
Add deprecated warning
aditya1702 Sep 13, 2023
12bf9e7
Add deprecated warning tests
aditya1702 Sep 13, 2023
2f5fb5f
Merge branch 'master' into deprecate-cli-flags
aditya1702 Sep 14, 2023
5879684
Merge branch 'master' into deprecate-cli-flags
aditya1702 Sep 15, 2023
e089982
Merge branch 'master' into deprecate-cli-flags
aditya1702 Sep 26, 2023
ff8eb7c
add test for env vars
aditya1702 Oct 2, 2023
53d0f76
Dynamically print deprecated message
aditya1702 Oct 3, 2023
2a58c41
Update flags.go
aditya1702 Oct 3, 2023
6425ca9
Update parameters_test.go
aditya1702 Oct 3, 2023
35bad2e
Update parameters_test.go
aditya1702 Oct 3, 2023
36d1395
Merge branch 'master' into deprecate-cli-flags
aditya1702 Oct 3, 2023
d536cba
Update parameters_test.go
aditya1702 Oct 3, 2023
cca510d
Update parameters_test.go
aditya1702 Oct 4, 2023
546bb3c
Shift environment.go to horizon package
aditya1702 Oct 4, 2023
e63356b
Move environment.go to test dir
aditya1702 Oct 4, 2023
6fa5852
Update flags_test.go
aditya1702 Oct 5, 2023
519d031
Update flags_test.go
aditya1702 Oct 5, 2023
b92c673
Update integration.go
aditya1702 Oct 5, 2023
758bf93
Nit changes - 1
aditya1702 Oct 6, 2023
52bb69e
Update CHANGELOG.md
aditya1702 Oct 6, 2023
ffe30f0
Merge branch 'master' into deprecate-cli-flags
aditya1702 Oct 6, 2023
915011a
Nit changes - 2
aditya1702 Oct 6, 2023
d2e6bdc
Merge branch 'deprecate-cli-flags' of https://github.com/aditya1702/g…
aditya1702 Oct 6, 2023
31ce796
Update flags_test.go
aditya1702 Oct 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update parameters_test.go
aditya1702 committed Oct 3, 2023
commit 35bad2e8c9a7e0eaa33d2eb87e9567d6f90f7e51
2 changes: 1 addition & 1 deletion services/horizon/internal/integration/parameters_test.go
Original file line number Diff line number Diff line change
@@ -509,8 +509,8 @@
os.Stderr = originalStderr

assert.Contains(t, string(outputBytes), "DEPRECATED - the use of command-line flags: "+
"[--db-url --captive-core-config-path --captive-core-use-db --enable-captive-core-ingestion --exp-enable-ingestion-filtering --captive-core-http-port --captive-core-storage-path --stellar-core-db-url --stellar-core-url --history-archive-urls --port --admin-port --max-db-connections --per-hour-rate-limit --network-passphrase --ingest --apply-migrations --checkpoint-frequency], "+
"[--db-url --stellar-core-binary-path --captive-core-config-path --captive-core-use-db --enable-captive-core-ingestion --captive-core-http-port --captive-core-storage-path --stellar-core-db-url --stellar-core-url --history-archive-urls --port --admin-port --max-db-connections --per-hour-rate-limit --network-passphrase --ingest --apply-migrations --checkpoint-frequency], "+

Check failure on line 512 in services/horizon/internal/integration/parameters_test.go

GitHub Actions / golangci

line is 378 characters (lll)
"has been deprecated in favor of environment variables. Please consult our Configuring section in the developer documentation on how to use them - https://developers.stellar.org/docs/run-api-server/configuring")

Check failure on line 513 in services/horizon/internal/integration/parameters_test.go

GitHub Actions / golangci

line is 214 characters (lll)
})
}


Unchanged files with check annotations Beta

import (
"fmt"
"github.com/spf13/cobra"

Check failure on line 5 in services/horizon/internal/flags_test.go

GitHub Actions / golangci

File is not `goimports`-ed with -local github.com/golangci/golangci-lint (goimports)
"os"
"testing"
// Verify required options and load the config struct
if err := flags.RequireE(); err != nil {
return err
}

Check failure on line 839 in services/horizon/internal/flags.go

GitHub Actions / golangci

line is 178 characters (lll)
if err := flags.SetValues(); err != nil {
return err
"and applications that want to access the Stellar network. It allows you to submit transactions to the " +
"network, check the status of accounts, subscribe to event streams and more.\n" +
"DEPRECATED - the use of command-line flags has been deprecated in favor of environment variables. Please" +
"consult our Configuring section in the developer documentation on how to use them - https://developers.stellar.org/docs/run-api-server/configuring",

Check failure on line 23 in services/horizon/cmd/root.go

GitHub Actions / golangci

line is 152 characters (lll)
RunE: func(cmd *cobra.Command, args []string) error {
app, err := horizon.NewAppFromFlags(config, flags)
if err != nil {