Skip to content

Commit

Permalink
fix panic during create integration tables when API_LISTEN doesn't …
Browse files Browse the repository at this point in the history
…contain ":" character, fix #790
  • Loading branch information
Slach committed Nov 23, 2023
1 parent c4b155a commit b363d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# v2.5.0 (not released yet)
# v2.4.6
IMPROVEMENTS
- make 'kopia' custom scripts really increment fix [781](https://github.com/Altinity/clickhouse-backup/issues/781)
- add `force_http` and improve retries in GCS upload [784](https://github.com/Altinity/clickhouse-backup/pull/784), thanks @minguyen9988

BUG FIXES
- add `Array(Tuple())` to exclude list for `check_parts_columns:true' fix [789](https://github.com/Altinity/clickhouse-backup/issues/789)
- fix `delete remote` command for s3 buckets with enabled versioning fix [782](https://github.com/Altinity/clickhouse-backup/issues/782)
- fix panic during create integration tables when `API_LISTEN` doesn't contain ":" character, fix [790](https://github.com/Altinity/clickhouse-backup/issues/790)

# v2.4.5
BUG FIXES
Expand Down
5 changes: 4 additions & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,10 @@ func (api *APIServer) CreateIntegrationTables() error {
return fmt.Errorf("can't connect to clickhouse: %w", err)
}
defer ch.Close()
port := strings.Split(api.config.API.ListenAddr, ":")[1]
port := "80"
if strings.Contains(api.config.API.ListenAddr, ":") {
port = api.config.API.ListenAddr[strings.Index(api.config.API.ListenAddr, ":"):]
}
auth := ""
if api.config.API.Username != "" || api.config.API.Password != "" {
params := url.Values{}
Expand Down

0 comments on commit b363d94

Please sign in to comment.