-
Notifications
You must be signed in to change notification settings - Fork 418
Feat: upgrade go version from 1.19.10 to 1.23.10 #2254
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
Conversation
.github/workflows/e2e-framework.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件删了是因为里面没有跑测试,就空编译了一下,而编译这一步其他测试已经包含
.golangci.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件改动是因为升级了golangci-lint的版本,配置文件格式变了
@@ -74,7 +74,7 @@ DIST_FILE = $(DIST_DIR)/loongcollector-$(VERSION).linux-$(ARCH).tar.gz | |||
|
|||
.PHONY: tools | |||
tools: | |||
$(GO_LINT) version || curl -sfL 10000 https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v1.49.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.49.0无法处理go 1.23.10,故需要升级
@@ -153,11 +153,6 @@ e2edocker: clean import_plugins | |||
./scripts/gen_build_scripts.sh e2e "$(GENERATED_HOME)" "$(VERSION)" "$(DOCKER_REPOSITORY)" "$(OUT_DIR)" "$(DOCKER_BUILD_EXPORT_GO_ENVS)" "$(DOCKER_BUILD_COPY_GIT_CONFIGS)" "$(PLUGINS_CONFIG_FILE)" "$(GO_MOD_FILE)" | |||
./scripts/docker_build.sh development "$(GENERATED_HOME)" "$(VERSION)" "$(DOCKER_REPOSITORY)" false "$(DOCKER_BUILD_USE_BUILDKIT)" | |||
|
|||
# provide a goc server for e2e testing | |||
.PHONY: gocdocker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goc是用于获取e2e的代码覆盖率的组件,但是不支持go 1.20+且平时也没人看,所以删了
k8s.io/client-go v0.29.1 | ||
k8s.io/api v0.32.1 | ||
k8s.io/apimachinery v0.32.1 | ||
k8s.io/client-go v0.32.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里顺便升级了client-go到更新版本
@@ -207,7 +207,7 @@ func NewFlusherKafka() *FlusherKafka { | |||
} | |||
func (k *FlusherKafka) Init(context pipeline.Context) error { | |||
k.context = context | |||
if k.Brokers == nil || len(k.Brokers) == 0 { | |||
if len(k.Brokers) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint:当内部的map/list为nil时,len也是0,所以只需要保留判断len = 0
mangled += "\\x" + strconv.FormatInt(int64(r), 16) | ||
} else { | ||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint:多个if-else需要替换为switch
} | ||
|
||
// gatherInfoOutput gathers | ||
func gatherInfoOutput( | ||
rdr *bufio.Reader, | ||
collector pipeline.Collector, | ||
tags map[string]string, | ||
) error { | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint:一直返回nil没有意义
@@ -85,7 +85,7 @@ func toMetricStoreFormat(metric *agent.JVMMetric, service string, serviceInstanc | |||
|
|||
for _, memPool := range metric.MemoryPool { | |||
memLabels.Replace("type", memPool.Type.String()) | |||
memPoolCommitted := helper.NewMetricLog("skywalking_jvm_memory_pool_committed", metric.GetTime(), float64(memPool.Commited), memLabels) | |||
memPoolCommitted := helper.NewMetricLog("skywalking_jvm_memory_pool_committed", metric.GetTime(), float64(memPool.Committed), memLabels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix lint:拼写错误
scripts/e2e_coverage.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是根据goc的结果来的,目前用不到了
f1712da
into
alibaba:main
This reverts commit f1712da.
* upgrade go version from 1.19.10 to 1.23.10 * update dev image * fix license * remove goc * update build script * update go lint * update go lint * fix lint * fix e2e * speedup ci * fix static check * fix go version
* upgrade go version from 1.19.10 to 1.23.10 * update dev image * fix license * remove goc * update build script * update go lint * update go lint * fix lint * fix e2e * speedup ci * fix static check * fix go version
…" (alibaba#2260) * Revert "Feat: upgrade go version from 1.19.10 to 1.23.10 (alibaba#2254)" This reverts commit f1712da. * update workflow
No description provided.