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

[WIP] feat: Update go version #830

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Example
**Test Configuration**:
* OS type & version: Ubuntu 20.04
* Hardware: x86-64 (e.g., x86, x86-64, arm, arm64)
* Toolchain: Docker v20.10 & Go v1.19
* Edge Orchestration Release: v1.1.x
* Toolchain: Docker v20.10 & Go v1.23
* Edge Orchestration Release: v1.2.x

# Checklist:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Install Qemu
if: ${{ matrix.arch != 'x86_64c' && matrix.arch != 'x86_64a' && matrix.arch != 'x86_64n'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a
2 changes: 1 addition & 1 deletion .github/workflows/go-fuzz-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Fuzz test
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Set env vars (golint)
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Set env vars (gocov)
run: |
Expand Down
9 changes: 6 additions & 3 deletions configs/defdockerfiles/ubuntu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Docker image for "edge-orchestration"
### ubuntu:20.04
ARG PLATFORM
FROM $PLATFORM/ubuntu:20.04
FROM $PLATFORM/ubuntu:24.04

# environment variables
ENV TARGET_DIR=/edge-orchestration
Expand All @@ -24,8 +24,11 @@ RUN mkdir -p $TARGET_DIR/res/
COPY $WEB_DIR/$BUILD_DIR/ $TARGET_DIR/$WEB_DIR/

# install required tools
RUN apt-get update
RUN apt-get install -y net-tools iproute2
# RUN apt-get update
# RUN apt-get install -y net-tools iproute2

RUN apt update
RUN apt install -y net-tools iproute2

# expose ports
EXPOSE $HTTP_PORT $MDNS_PORT $ZEROCONF_PORT $MNEDC_PORT $MNEDC_BROADCAST_PORT $UI_PORT
Expand Down
13 changes: 8 additions & 5 deletions configs/defdockerfiles/ubuntu_multistage
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Docker image for "edge-orchestration"
FROM --platform=$TARGETPLATFORM ubuntu:20.04 AS builder
FROM --platform=$TARGETPLATFORM ubuntu:24.04 AS builder

# environment variables
ARG TARGETPLATFORM
ENV GOVERSION=1.19.1
ENV GOVERSION=1.23.2
ENV GOPATH=/usr/local/go
ENV TARGET_DIR=/edge-orchestration

Expand All @@ -19,7 +19,7 @@ RUN script/install-golang.sh
ARG TARGETVERSION
RUN make buildx_binary VERSION=$TARGETVERSION

FROM ubuntu:20.04
FROM ubuntu:24.04

# environment variables
ENV TARGET_DIR=/edge-orchestration
Expand All @@ -44,8 +44,11 @@ COPY --from=builder $TARGET_DIR/$WEB_DIR/$BUILD_DIR $TARGET_DIR/$WEB_DIR/
RUN mkdir -p $TARGET_DIR/res/

# install required tools
RUN apt-get update
RUN apt-get install -y net-tools iproute2
# RUN apt-get update
# RUN apt-get install -y net-tools iproute2

RUN apt update
RUN apt install -y net-tools iproute2

# expose ports
EXPOSE $HTTP_PORT $MDNS_PORT $ZEROCONF_PORT $MNEDC_PORT $MNEDC_BROADCAST_PORT $UI_PORT
Expand Down
2 changes: 1 addition & 1 deletion docs/platforms/x86_64_linux/x86_64_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Please see the below [How to work](#how-to-work) to know how to run Edge Orchest
`$ sudo usermod -aG docker $USER`

- go compiler
- Version: 1.19 (or above)
- Version: 1.23 (or above)
- [How to install](https://golang.org/dl/)

> To build Edge Orchestrator from Go sources, you need to set GOPATH environment variable:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/lf-edge/edge-home-orchestration-go

go 1.19
go 1.23

require (
github.com/casbin/casbin v1.9.1
Expand Down
14 changes: 7 additions & 7 deletions internal/common/resourceutil/resourceutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func TestGetCPUUsage(t *testing.T) {

cpuUsage, err := resourceIns.GetResource(CPUUsage)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if cpuUsage != dummyCPUPercentResult {
Expand Down Expand Up @@ -291,7 +291,7 @@ func TestGetCPUFreq(t *testing.T) {

cpuFreq, err := resourceIns.GetResource(CPUFreq)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if cpuFreq != dummyCPUFreqResult {
Expand Down Expand Up @@ -324,7 +324,7 @@ func TestGetCPUCount(t *testing.T) {

cpuCount, err := resourceIns.GetResource(CPUCount)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if cpuCount != dummyCPUCountResult {
Expand Down Expand Up @@ -357,7 +357,7 @@ func TestGetMemAvailable(t *testing.T) {

memAvailable, err := resourceIns.GetResource(MemAvailable)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if memAvailable != dummyMemAvailableResult {
Expand Down Expand Up @@ -390,7 +390,7 @@ func TestGetMemFree(t *testing.T) {

memFree, err := resourceIns.GetResource(MemFree)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if memFree != dummyMemFreeResult {
Expand Down Expand Up @@ -423,7 +423,7 @@ func TestGetNetMBps(t *testing.T) {

netMBps, err := resourceIns.GetResource(NetMBps)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if netMBps != dummyNetMBpsResult {
Expand Down Expand Up @@ -456,7 +456,7 @@ func TestGetNetBandwidth(t *testing.T) {

netBandwidth, err := resourceIns.GetResource(NetBandwidth)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

if netBandwidth != dummyNetBandwidthResult {
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/configuremgr/configuremgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestSetConfigPath(t *testing.T) {
t.Errorf("%s != %s", defaultConfPath, configuremgrObj.confpath)
}
} else {
t.Errorf(err.Error())
t.Error(err.Error())
}
})
t.Run("No File", func(t *testing.T) {
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestBasicMockConfigureMgr(t *testing.T) {
os.RemoveAll(dir)
err := os.Mkdir(dir, 0775)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
} else {
files, err := os.ReadDir(src)
if err != nil {
Expand All @@ -104,7 +104,7 @@ func TestBasicMockConfigureMgr(t *testing.T) {
fileContent, _ := os.ReadFile(filepath.Join(src, file.Name()))
err = os.WriteFile(filepath.Join(dir, file.Name()), []byte(fileContent), 0664)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/zeroconf/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grandcat/zeroconf

go 1.19
go 1.23

require (
github.com/cenkalti/backoff v2.2.1+incompatible
Expand Down
Loading