clickhouse-operator
                                
                                
                                
                                    clickhouse-operator copied to clipboard
                            
                            
                            
                        Symlink makes it impossible to import package
Go doesn't follow symlink in import parts. Because of this symlink it is now impossible to import this package:
% cat main.go
package main
import "github.com/altinity/clickhouse-operator/pkg/apis/metrics"
func main() {
	_ = metrics.NewExporter
}
% go mod tidy
go: finding module for package github.com/altinity/clickhouse-operator/pkg/apis/metrics
go: found github.com/altinity/clickhouse-operator/pkg/apis/metrics in github.com/altinity/clickhouse-operator v0.0.0-20220307063955-cecb54ad1ade
go: finding module for package github.com/altinity/clickhouse-operator/pkg/client/clientset/versioned
example imports
	github.com/altinity/clickhouse-operator/pkg/apis/metrics imports
	github.com/altinity/clickhouse-operator/pkg/client/clientset/versioned: module github.com/altinity/clickhouse-operator@latest found (v0.0.0-20220307063955-cecb54ad1ade), but does not contain package github.com/altinity/clickhouse-operator/pkg/client/clientset/versioned
I suggest that all import statements get changed to the new path. I don't see any reason to keep the old imports and have this symlink in place.
We didn't assume use parts of clickhouse-operator code will use as library
If you want to scrape clickhouse via prometheus
I propose to use embedded prometheus endpoint
Look to
https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings/#server_configuration_parameters-prometheus
and https://grafana.com/grafana/dashboards/13500
The clickhouse prometheus endpoint doesn't expose enough to make the Altinity alerts config work. What is the harm in making it possible to import code from this package? We have successfully done this for the last year. The only thing that needs to change now is this symlink.
What is the harm in making it possible to import code from this package
We could change it in future and not have resource to maintain it as library with backwards compatibility
You don't have to guarantee backwards compatibility. I don't care if you break backwards compatibility, people can just change their code to match your changes. But being able to import in the past and not being able to import now is annoying.
code generator reworked please check 0.23.3 version hope it helps