8000 Feat: upgrade go version from 1.19.10 to 1.23.10 by Takuka0311 · Pull Request #2254 · alibaba/loongcollector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 12 commits into from
Jun 16, 2025

Conversation

Takuka0311
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件删了是因为里面没有跑测试,就空编译了一下,而编译这一步其他测试已经包含

.golangci.yml Outdated
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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 {
Copy link
Collaborator Author

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:
Copy link
Collaborator Author

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 {
) {
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix lint:拼写错误

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是根据goc的结果来的,目前用不到了

@Takuka0311 Takuka0311 merged commit f1712da into alibaba:main Jun 16, 2025
16 of 17 checks passed
< 8000 /span>
Takuka0311 added a commit to Takuka0311/LoongCollector that referenced this pull request Jun 18, 2025
Takuka0311 added a commit that referenced this pull request Jun 19, 2025
)

* Revert "Feat: upgrade go version from 1.19.10 to 1.23.10 (#2254)"

This reverts commit f1712da.

* update workflow
WRPStephanie pushed a commit to WRPStephanie/loongcollector that referenced this pull request Jun 20, 2025
* 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
xiongyunn pushed a commit to xiongyunn/loongcollector that referenced this pull request Jun 27, 2025
* 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
xiongyunn pushed a commit to xiongyunn/loongcollector that referenced this pull request Jun 27, 2025
…" (alibaba#2260)

* Revert "Feat: upgrade go version from 1.19.10 to 1.23.10 (alibaba#2254)"

This reverts commit f1712da.

* update workflow
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.

3 participants
0