Skip to content

fix(triple_protocol): replace Buf Technologies license header with ASF header#3464

Merged
AlexStocks merged 3 commits into
apache:developfrom
Aias00:worktree-license-header-update
Jun 30, 2026
Merged

fix(triple_protocol): replace Buf Technologies license header with ASF header#3464
AlexStocks merged 3 commits into
apache:developfrom
Aias00:worktree-license-header-update

Conversation

@Aias00

@Aias00 Aias00 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Replace Buf Technologies, Inc. license headers with Apache Software Foundation (ASF) license headers in the triple_protocol package.

Changes:

  1. License header replacement - Updated 59 files:

    • 55 Go source files (.go)
    • 4 Protocol buffer files (.proto)
  2. Makefile modification - Removed automatic license header generation:

    • Removed license-header tool dependency from generate target
    • Removed COPYRIGHT_YEARS and LICENSE_IGNORE variables
    • Removed $(BIN)/license-header installation target

This prevents future make generate runs from re-adding Buf Technologies headers.

Before:

// Copyright 2021-2023 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
...

After:

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

🤖 Generated with Claude Code

…F header

- Replace Buf Technologies copyright header with Apache Software Foundation header in 55 Go files
- Replace Buf Technologies copyright header in 4 proto files
- Remove license-header tool from Makefile to prevent auto-generation of Buf headers
- Remove COPYRIGHT_YEARS and LICENSE_IGNORE variables from Makefile

This ensures all files have proper ASF license headers for Apache Dubbo project.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 02:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the protocol/triple/triple_protocol package to use Apache Software Foundation (ASF) license headers instead of the prior Buf Technologies headers, and adjusts the package Makefile to avoid reintroducing the old headers during code generation.

Changes:

  • Replaced Buf Technologies license headers with ASF license headers across the triple protocol Go and proto sources (including generated code under internal/gen/).
  • Updated protocol/triple/triple_protocol/Makefile to remove the license-header tooling from make generate.

Reviewed changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
protocol/triple/triple_protocol/Makefile Removes license-header install/use from generate to prevent re-adding Buf headers.
protocol/triple/triple_protocol/bench_test.go Updates file header to ASF.
protocol/triple/triple_protocol/buffer_pool.go Updates file header to ASF.
protocol/triple/triple_protocol/client.go Updates file header to ASF.
protocol/triple/triple_protocol/client_example_test.go Updates file header to ASF.
protocol/triple/triple_protocol/client_ext_test.go Updates file header to ASF.
protocol/triple/triple_protocol/client_stream.go Updates file header to ASF.
protocol/triple/triple_protocol/client_stream_test.go Updates file header to ASF.
protocol/triple/triple_protocol/code.go Updates file header to ASF.
protocol/triple/triple_protocol/code_test.go Updates file header to ASF.
protocol/triple/triple_protocol/codec.go Updates file header to ASF.
protocol/triple/triple_protocol/codec_test.go Updates file header to ASF.
protocol/triple/triple_protocol/codec_wrapper_test.go Updates file header to ASF.
protocol/triple/triple_protocol/compression.go Updates file header to ASF.
protocol/triple/triple_protocol/compression_test.go Updates file header to ASF.
protocol/triple/triple_protocol/cors.go Updates file header to ASF.
protocol/triple/triple_protocol/cors_test.go Updates file header to ASF.
protocol/triple/triple_protocol/duplex_http_call.go Updates file header to ASF.
protocol/triple/triple_protocol/envelope.go Updates file header to ASF.
protocol/triple/triple_protocol/envelope_test.go Updates file header to ASF.
protocol/triple/triple_protocol/error.go Updates file header to ASF.
protocol/triple/triple_protocol/error_example_test.go Updates file header to ASF.
protocol/triple/triple_protocol/error_test.go Updates file header to ASF.
protocol/triple/triple_protocol/error_writer.go Updates file header to ASF.
protocol/triple/triple_protocol/error_writer_example_test.go Updates file header to ASF.
protocol/triple/triple_protocol/example_init_test.go Updates file header to ASF.
protocol/triple/triple_protocol/handler.go Updates file header to ASF.
protocol/triple/triple_protocol/handler_compat.go Updates file header to ASF.
protocol/triple/triple_protocol/handler_compat_test.go Updates file header to ASF.
protocol/triple/triple_protocol/handler_example_test.go Updates file header to ASF.
protocol/triple/triple_protocol/handler_ext_test.go Updates file header to ASF.
protocol/triple/triple_protocol/handler_stream.go Updates file header to ASF.
protocol/triple/triple_protocol/handler_stream_compat.go Updates file header to ASF.
protocol/triple/triple_protocol/header.go Updates file header to ASF.
protocol/triple/triple_protocol/header_compat.go Updates file header to ASF.
protocol/triple/triple_protocol/header_test.go Updates file header to ASF.
protocol/triple/triple_protocol/idempotency_level.go Updates file header to ASF.
protocol/triple/triple_protocol/interceptor.go Updates file header to ASF.
protocol/triple/triple_protocol/interceptor_example_test.go Updates file header to ASF.
protocol/triple/triple_protocol/interceptor_ext_test.go Updates file header to ASF.
protocol/triple/triple_protocol/maxbytes.go Updates file header to ASF (note: build-tag issue flagged in review).
protocol/triple/triple_protocol/maxbytes_low_version.go Updates file header to ASF (retains build tags).
protocol/triple/triple_protocol/method_route_mux.go Updates file header to ASF.
protocol/triple/triple_protocol/method_route_mux_test.go Updates file header to ASF.
protocol/triple/triple_protocol/negotiation.go Updates file header to ASF.
protocol/triple/triple_protocol/negotiation_test.go Updates file header to ASF.
protocol/triple/triple_protocol/option.go Updates file header to ASF.
protocol/triple/triple_protocol/protobuf_util.go Updates file header to ASF.
protocol/triple/triple_protocol/protobuf_util_test.go Updates file header to ASF.
protocol/triple/triple_protocol/protocol.go Updates file header to ASF.
protocol/triple/triple_protocol/protocol_grpc.go Updates file header to ASF.
protocol/triple/triple_protocol/protocol_grpc_test.go Updates file header to ASF.
protocol/triple/triple_protocol/protocol_test.go Updates file header to ASF.
protocol/triple/triple_protocol/protocol_triple.go Updates file header to ASF.
protocol/triple/triple_protocol/protocol_triple_test.go Updates file header to ASF.
protocol/triple/triple_protocol/recover.go Updates file header to ASF.
protocol/triple/triple_protocol/recover_ext_test.go Updates file header to ASF.
protocol/triple/triple_protocol/server.go Updates file header to ASF.
protocol/triple/triple_protocol/server_test.go Updates file header to ASF.
protocol/triple/triple_protocol/triple.go Updates file header to ASF.
protocol/triple/triple_protocol/triple_ext_test.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/assert/assert.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/assert/assert_test.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/gen/proto/connect/collide/v1/collide.pb.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/gen/proto/connect/import/v1/import.pb.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/gen/proto/connect/import/v1/importv1connect/import.connect.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/gen/proto/connect/ping/v1/ping.pb.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/gen/proto/connect/ping/v1/pingv1connect/ping.connect.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/gen/proto/connectext/grpc/status/v1/status.pb.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/proto/connectext/grpc/status/v1/status.proto Updates file header to ASF.
protocol/triple/triple_protocol/internal/proto/connectext/grpc/status/v1/status.pb.go Updates file header to ASF.
protocol/triple/triple_protocol/internal/proto/triple/collide/v1/collide.proto Updates file header to ASF.
protocol/triple/triple_protocol/internal/proto/triple/import/v1/import.proto Updates file header to ASF.
protocol/triple/triple_protocol/internal/proto/triple/ping/v1/ping.proto Updates file header to ASF.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +5
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
Aias00 and others added 2 commits June 30, 2026 10:22
- Add //go:build go1.19 and // +build go1.19 constraints
- Build constraints must precede license header per Go convention
- Remove duplicate leftover license text lines

Co-Authored-By: Claude <noreply@anthropic.com>
…xt_test.go

The package declaration was accidentally removed when replacing the license header.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.91%. Comparing base (8b5bbcf) to head (039d218).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3464      +/-   ##
===========================================
+ Coverage    53.57%   53.91%   +0.34%     
===========================================
  Files          460      461       +1     
  Lines        35182    35478     +296     
===========================================
+ Hits         18847    19127     +280     
+ Misses       14857    14846      -11     
- Partials      1478     1505      +27     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexStocks AlexStocks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

结论: ✅ 可 Merge

纯 license header 替换,无任何功能性代码变更。61 个文件的变更全部是将 Buf Technologies, Inc.// 注释风格 license header 替换为 ASF 标准的 /* */ 块注释风格 header。CI 全部通过(含 Check License Header)。

审查要点

  1. 覆盖完整triple_protocol/ 下 75 个 .go/.proto 文件中,61 个由本 PR 修改,其余文件在 develop 分支上已是 ASF header(如 cors.go、handler_compat.go 等),无遗漏。
  2. Makefile 防护到位 — 移除了 license-header 工具依赖、COPYRIGHT_YEARS/LICENSE_IGNORE 变量及安装 target,防止后续 make generate 重新注入 Buf header。
  3. CI 验证 — 8 项检查全部 pass,包括 Check License Header
  4. PR 描述小偏差 — 描述写 "59 files"(55 Go + 4 proto),实际 diff 显示 60 个 .go/.proto + 1 Makefile = 61 files。不影响正确性。

补充说明

部分文件(如 ping.protoping.connect.gotriple_ext_test.go 等)内部仍保留了对 bufbuild/connect-go 上游的引用注释(如 // The canonical location for this file is...)。这些是上游归属说明而非 license 声明,保留是合理的。

@AlexStocks AlexStocks merged commit 630393d into apache:develop Jun 30, 2026
8 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

4 participants