Skip to content

Conversation

@cqhasy
Copy link
Contributor

@cqhasy cqhasy commented Sep 6, 2025

No description provided.

pkgUpdates[newKey] = newVal
}

// 添加protocols导入路径的处理
Copy link
Contributor

Choose a reason for hiding this comment

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

Please delete the Chinese comment.

val := strings.ReplaceAll(filepath.Join(agentcore.EnhanceBasePackage, p), `\`, `/`)
pkgUpdates[key] = val
}
// 添加protocols导入路径的处理
Copy link
Contributor

Choose a reason for hiding this comment

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

Please delete Chinese comment.

#!/bin/bash

# Configuration parameters
REPO_URL="https://github.com/apache/skywalking-data-collect-protocol.git"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you don't use the submodule to import the data collect protocol dependency repo? It easy to control the version, rather than using git command.

Makefile Outdated
##@ General

.PHONY: generate-proto
generate-proto: ##generate data collect proto
Copy link
Contributor

Choose a reason for hiding this comment

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

This command should be invoke before the plugin or E2E test? Please make sure the all the test can be executed successfully

# -----------------------------
if [ ! -d "$SUBMODULE_PATH" ]; then
echo "Initializing submodule..."
git submodule update --init --recursive "$SUBMODULE_PATH"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this update, the git submodule already lock the version.

cd "$SUBMODULE_PATH"
git fetch --all
git checkout "$SUBMODULE_COMMIT"
cd - > /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to checkout, just generate the gRPC code is enough.

@cqhasy cqhasy reopened this Sep 11, 2025
@cqhasy cqhasy closed this Sep 11, 2025
@cqhasy cqhasy reopened this Sep 11, 2025
@cqhasy cqhasy closed this Sep 11, 2025
@wu-sheng
Copy link
Member

I think you could slightly change the CI control file to run this in your fork repo. It will cost time for you to do this through a PR.

@cqhasy cqhasy reopened this Sep 11, 2025
Copy link
Contributor

@mrproliu mrproliu left a comment

Choose a reason for hiding this comment

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

Please also update the CHANGES.md to declare that the agent has replaced the goapi and generates it by itself.

submodules: true
- name: Install unzip
run: sudo apt-get update && sudo apt-get install -y unzip
- name: Check Go version
Copy link
Contributor

Choose a reason for hiding this comment

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

The setup Go already define the go version, why there still needs to check again?

with:
submodules: true
- name: Install unzip
run: sudo apt-get update && sudo apt-get install -y unzip
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the unzip not define in the original runner? If exist, please remove this install step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unzip is not install before

path: test/e2e/case/kafka/e2e.yaml
steps:
- uses: actions/checkout@v2
- name: Set up Go
Copy link
Contributor

Choose a reason for hiding this comment

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

In the Job, the agent have already built, so don't needs to generate the protocol again.

- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Go 1.19
Copy link
Contributor

Choose a reason for hiding this comment

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

The agent binary is already built. Please remove unnecessary generated code.

uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Install unzip
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, the agent already built.

Comment on lines 24 to 27
export GOPROXY=https://goproxy.cn,direct
PROTOC_VERSION=3.14.0
export PATH="/home/runner/go/bin:$PATH"
export GOPATH="${GOPATH:-$HOME/go}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need to declare GOPROXY, PATH, and GOPATH? It should use the user system configuration.
User system doesn't have /home/runner, it should only work for the GitHub Runner.

INCLUDE_DIR="$TEMPDIR"/include

SUBMODULE_PATH="skywalking-data-collect-protocol"
OUTPUT_BASE_DIR="../../protocols"
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use the absolute directory. If the user executes this command in another directory, the output directory is not expected.

go version
if ! command -v protoc-gen-go &>/dev/null; then
echo "Installing protoc-gen-go v1.26..."
GO111MODULE=on GOPROXY=https://goproxy.cn,direct GOSUMDB=sum.golang.google.cn go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove these env, just do go install.


if ! command -v protoc-gen-go-grpc &>/dev/null; then
echo "Installing protoc-gen-go-grpc v1.1..."
GO111MODULE=on GOPROXY=https://goproxy.cn,direct GOSUMDB=sum.golang.google.cn go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove these env, just do go install.

@cqhasy cqhasy closed this Sep 11, 2025
@cqhasy cqhasy reopened this Sep 11, 2025
# -----------------------------
# Configuration
# -----------------------------
#export GOPROXY=https://goproxy.cn,direct
Copy link
Contributor

Choose a reason for hiding this comment

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

Please delete it rather than comment it.

CHANGES.md Outdated

#### Documentation

* Replace external `goapi` dependency with in-repo generated protocols.
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be declared in the feature selection.

@mrproliu mrproliu added the enhancement New feature or request label Sep 11, 2025
@mrproliu mrproliu added this to the 0.7.0 milestone Sep 11, 2025
@mrproliu mrproliu merged commit 0d8a5be into apache:main Sep 11, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants