Skip to content
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

go 1.22 #636

Merged
merged 3 commits into from
Mar 20, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-egress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6
go-version: 1.22.1

- name: Download Go modules
run: go mod download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6
go-version: 1.22.1

- name: Download Go modules
run: go mod download
Expand Down
4 changes: 2 additions & 2 deletions build/egress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ WORKDIR /workspace

# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
wget https://go.dev/dl/go1.21.6.linux-${GOARCH}.tar.gz && \
wget https://go.dev/dl/go1.22.1.linux-${GOARCH}.tar.gz && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.21.6.linux-${GOARCH}.tar.gz
tar -C /usr/local -xzf go1.22.1.linux-${GOARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"


Expand Down
8 changes: 4 additions & 4 deletions build/test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ ARG TARGETPLATFORM

# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
wget https://go.dev/dl/go1.21.6.linux-${GOARCH}.tar.gz && \
wget https://go.dev/dl/go1.22.1.linux-${GOARCH}.tar.gz && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.21.6.linux-${GOARCH}.tar.gz
tar -C /usr/local -xzf go1.22.1.linux-${GOARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"

# download go modules
Expand Down Expand Up @@ -67,9 +67,9 @@ RUN apt-get update && \

# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
wget https://go.dev/dl/go1.21.6.linux-${GOARCH}.tar.gz && \
wget https://go.dev/dl/go1.22.1.linux-${GOARCH}.tar.gz && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.21.6.linux-${GOARCH}.tar.gz
tar -C /usr/local -xzf go1.22.1.linux-${GOARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"

# install chrome
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/livekit/egress

go 1.21

toolchain go1.21.6
go 1.22

require (
cloud.google.com/go/storage v1.36.0
Expand All @@ -19,7 +17,7 @@ require (
github.com/gorilla/websocket v1.5.1
github.com/livekit/livekit-server v1.5.1-0.20231026153736-8b16db227070
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
github.com/livekit/protocol v1.11.1-0.20240311233654-34e705a573b5
github.com/livekit/protocol v1.12.0
github.com/livekit/psrpc v0.5.3-0.20240312110212-61ab09477c30
github.com/livekit/server-sdk-go/v2 v2.0.1
github.com/pion/rtp v1.8.3
Expand All @@ -35,7 +33,7 @@ require (
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
google.golang.org/api v0.162.0
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.32.0
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
github.com/livekit/mediatransportutil v0.0.0-20231213075826-cccbf2b93d3f h1:XHrwGwLNGQB3ZqolH1YdMH/22hgXKr4vm+2M7JKMMGg=
github.com/livekit/mediatransportutil v0.0.0-20231213075826-cccbf2b93d3f/go.mod h1:GBzn9xL+mivI1pW+tyExcKgbc0VOc29I9yJsNcAVaAc=
github.com/livekit/protocol v1.11.1-0.20240311233654-34e705a573b5 h1:nvLX0rpWyWO1A2LUuvqxNhgnDkOe7kxTQ8Y3P0g/BLc=
github.com/livekit/protocol v1.11.1-0.20240311233654-34e705a573b5/go.mod h1:znZpBU024XvKIpC9jkFzfrJMDuucDb4B1ON9lbUJMGA=
github.com/livekit/protocol v1.12.0 h1:B7qsqq5xf9MmyG9WEk9/gMsfMVXuyLNxX5cO6TQil6s=
github.com/livekit/protocol v1.12.0/go.mod h1:G7Pa985GhZv2MCC3UnUocBhZfi3DsWA6WmlSkkpQYTM=
github.com/livekit/psrpc v0.5.3-0.20240312110212-61ab09477c30 h1:3GEU6vP+KLTTOEqsFKW+PgIUp+i+s0jaUqogQc/hb7M=
github.com/livekit/psrpc v0.5.3-0.20240312110212-61ab09477c30/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0=
github.com/livekit/server-sdk-go/v2 v2.0.1 h1:qwuMK7WUd30DM7IJ2sOqpQcZcHqP02tzs5Y6CRsV4Lg=
Expand Down Expand Up @@ -480,8 +480,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
6 changes: 3 additions & 3 deletions pkg/stats/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/livekit/egress/pkg/types"
"github.com/livekit/protocol/logger"
"github.com/livekit/protocol/rpc"
"github.com/livekit/protocol/utils"
"github.com/livekit/protocol/utils/hwstats"
)

type Monitor struct {
Expand All @@ -37,7 +37,7 @@ type Monitor struct {
promCPULoad prometheus.Gauge
requestGauge *prometheus.GaugeVec

cpuStats *utils.CPUStats
cpuStats *hwstats.CPUStats
requests atomic.Int32

mu sync.Mutex
Expand Down Expand Up @@ -82,7 +82,7 @@ func (m *Monitor) Start(
) error {
m.killProcess = killProcess

procStats, err := utils.NewProcCPUStats(m.updateEgressStats)
procStats, err := hwstats.NewProcCPUStats(m.updateEgressStats)
if err != nil {
return err
}
Expand Down