Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/commit-message-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'commit-message-check'
on:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
check-commit-message:
Expand Down
35 changes: 15 additions & 20 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,11 @@ jobs:
run: |
echo Home path is $HOME
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME

# for format workspace
mkdir -p $HOME/go/src/
ln -s $GITHUB_WORKSPACE $WORKBASE
export WORK=$GITHUB_WORKSPACE/$PNAME
mkdir -p $WORKBASE
ln -sfn $GITHUB_WORKSPACE/framework $WORKBASE/framework

# check work folder
ls -lrt $WORKBASE/
ls -alrt $WORK

# for code format
Expand All @@ -64,7 +61,9 @@ jobs:
shell: bash
run: |
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME
export WORK=$GITHUB_WORKSPACE/$PNAME
mkdir -p $WORKBASE
ln -sfn $GITHUB_WORKSPACE/framework $WORKBASE/framework

# for foramt check
cd $WORK
Expand All @@ -80,7 +79,9 @@ jobs:
if: steps.check-changes.outputs.changes == 'true'
run: |
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME
export WORK=$GITHUB_WORKSPACE/$PNAME
mkdir -p $WORKBASE
ln -sfn $GITHUB_WORKSPACE/framework $WORKBASE/framework

# for foramt check
cd $WORK && echo
Expand Down Expand Up @@ -123,14 +124,11 @@ jobs:
run: |
echo Home path is $HOME
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME

# for test workspace
mkdir -p $HOME/go/src/
ln -s $GITHUB_WORKSPACE $WORKBASE
export WORK=$GITHUB_WORKSPACE/$PNAME
mkdir -p $WORKBASE
ln -sfn $GITHUB_WORKSPACE/framework $WORKBASE/framework

# check work folder
ls -lrt $WORKBASE/
ls -alrt $WORK

# for unit test
Expand Down Expand Up @@ -171,14 +169,11 @@ jobs:
run: |
echo Home path is $HOME
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME

# for lint workspace
mkdir -p $HOME/go/src/
ln -s $GITHUB_WORKSPACE $WORKBASE
export WORK=$GITHUB_WORKSPACE/$PNAME
mkdir -p $WORKBASE
ln -sfn $GITHUB_WORKSPACE/framework $WORKBASE/framework

# check work folder
ls -lrt $WORKBASE/
ls -alrt $WORK

# for code lint
Expand Down
1 change: 1 addition & 0 deletions docs/content.en/docs/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Information about release notes of INFINI Gateway is provided here.
### 🚀 Features
### 🐛 Bug fix
- Fix entry startup cleanup so failed reloads do not leave the listener port occupied.
- Fix PR checks to build Gateway in Go module mode without the legacy GOPATH vendor workspace dependency, and keep cross-platform builds working when `floating_ip` is enabled.
### ✈️ Improvements
- Pre-initialize `es_scroll` output queues, reduce noisy routing logs, and unify duration/QPS logging for scroll and bulk processing paths.

Expand Down
1 change: 1 addition & 0 deletions docs/content.zh/docs/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ title: "版本历史"
### 🚀 Features
### 🐛 Bug fix
- 修复入口启动失败时监听端口未释放的问题,避免 reload 失败后端口仍被占用。
- 修复 PR 检查在 Go Modules 模式下对旧 GOPATH vendor 工作区的依赖,并保持启用 `floating_ip` 时跨平台构建可用。
### ✈️ Improvements
- 预初始化 `es_scroll` 输出队列,减少 `_routing` 相关噪音日志,并统一 scroll 与 bulk 处理路径的耗时/QPS 日志格式。

Expand Down
13 changes: 13 additions & 0 deletions service/floating_ip/arp_supported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//go:build linux || darwin || freebsd || openbsd

package floating_ip

import (
"net"

"github.com/j-keck/arping"
)

func announceFloatingIP(ip net.IP, iface string) error {
return arping.GratuitousArpOverIfaceByName(ip, iface)
}
13 changes: 13 additions & 0 deletions service/floating_ip/arp_unsupported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//go:build !(linux || darwin || freebsd || openbsd)

package floating_ip

import (
"fmt"
"net"
"runtime"
)

func announceFloatingIP(_ net.IP, _ string) error {
return fmt.Errorf("gratuitous arp announcement is not supported on %s", runtime.GOOS)
}
3 changes: 1 addition & 2 deletions service/floating_ip/floating_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"time"

log "github.com/cihub/seelog"
"github.com/j-keck/arping"
"infini.sh/framework/core/config"
"infini.sh/framework/core/env"
"infini.sh/framework/core/errors"
Expand Down Expand Up @@ -214,7 +213,7 @@ func (module FloatingIPPlugin) SwitchToActiveMode() {

log.Trace("announce floating_ip, do arping every 10s")
ip := net1.ParseIP(floatingIPConfig.IP)
err := arping.GratuitousArpOverIfaceByName(ip, floatingIPConfig.Interface)
err := announceFloatingIP(ip, floatingIPConfig.Interface)
if err != nil {
if util.ContainStr(err.Error(), "unable to open") {
panic("please make sure running as root user, or sudo")
Expand Down
Loading