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

Bump golang.org/x/net to version 0.23.0 or later #17

Merged
merged 1 commit into from
May 30, 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
28 changes: 23 additions & 5 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ eclipse/paho.mqtt.golang (1.4.3)
* Project: https://github.com/eclipse/paho.mqtt.golang
* Source: https://github.com/eclipse/paho.mqtt.golang/releases/tag/v1.4.3

gorilla/websocket (1.4.2)
gorilla/websocket (1.5.0)

* License: BSD 2-Clause "Simplified" License
* Project: https://github.com/gorilla/websocket
Expand All @@ -58,17 +58,35 @@ golang/go (1.21)
* Project: https://github.com/golang/go
* Source: https://github.com/golang/go/releases/tag/go1.21

golang.org/x/net (0.17.0)
google/uuid (1.3.0)

* License: BSD 3-Clause "New" or "Revised" License
* Project: https://github.com/google/uuid
* Source: https://github.com/google/uuid/releases/tag/v1.3.0

pkg/errors (0.9.1)

* License: BSD 2-Clause "Simplified" License
* Project: https://github.com/pkg/errors
* Source: https://github.com/pkg/errors/releases/tag/v0.9.1

rickar/props (1.0.0)

* License: BSD 3-Clause "New" or "Revised" License
* Project: https://github.com/rickar/props
* Source: https://github.com/rickar/props/releases/tag/go1.21

golang.org/x/net (0.25.0)

* License: BSD 3-Clause "New" or "Revised" License
* Project: https://pkg.go.dev/golang.org/x/net
* Source: https://github.com/golang/net/tree/v0.17.0
* Source: https://github.com/golang/net/tree/v0.25.0

golang.org/x/sync (0.4.0)
golang.org/x/sync (0.7.0)

* License: BSD 3-Clause "New" or "Revised" License
* Project: https://pkg.go.dev/golang.org/x/sync
* Source: https://github.com/golang/sync/tree/v0.4.0
* Source: https://github.com/golang/sync/tree/v0.7.0

## Cryptography

Expand Down
14 changes: 5 additions & 9 deletions custom-update-agent/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ module github.com/eclipse-kanto/example-applications/custom-update-agent

go 1.21

replace github.com/docker/docker => github.com/moby/moby v23.0.3+incompatible

require (
github.com/eclipse-kanto/container-management v0.1.0-M4
github.com/eclipse-kanto/update-manager v0.1.0-M4.0.20240112143913-bbeef46051af
github.com/pkg/errors v0.9.1
github.com/rickar/props v1.0.0
)

require (
github.com/eclipse/ditto-clients-golang v0.0.0-20230504175246-3e6e17510ac4 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.1 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.13.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
)
27 changes: 12 additions & 15 deletions custom-update-agent/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eclipse-kanto/container-management v0.1.0-M4 h1:061GDDWH+3pW7rn5OHiJ5VT9fodjz3pVnGW59j1qcnQ=
github.com/eclipse-kanto/container-management v0.1.0-M4/go.mod h1:CpoavUZrXKGNYrRNGnvSLZEBkx/K3gl4DpY61YSpAdU=
github.com/eclipse-kanto/update-manager v0.1.0-M4.0.20240112143913-bbeef46051af h1:ChZkNmAMM0kT6D6Y+BRodzAdaMJqqKq6tKZC4rLFUXQ=
github.com/eclipse-kanto/update-manager v0.1.0-M4.0.20240112143913-bbeef46051af/go.mod h1:JtTUDoVwEHSI1QYlzn1AZSVNfUazMo+um8LM/rbRbbI=
github.com/eclipse/ditto-clients-golang v0.0.0-20230504175246-3e6e17510ac4 h1:Z3jNhQFfkUmwyFv8JRnGRn3WCJ9+teLeFhh7rGHYtUo=
github.com/eclipse/ditto-clients-golang v0.0.0-20230504175246-3e6e17510ac4/go.mod h1:ey7YwfHSQJsinGkGbgeEgqZA7qJnoB0YiFVTFEY50Jg=
github.com/eclipse/paho.mqtt.golang v1.3.5/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc=
github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI=
github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik=
github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rickar/props v1.0.0 h1:3C3j+wF2/XbQ/sCGRK8DkCLwuRvzqToMvDzmdxHwCsg=
github.com/rickar/props v1.0.0/go.mod h1:VVywBJXdOY3IwDtBmgAMIZs/XM/CtMKSJzu5dsHYwEY=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
Expand All @@ -39,22 +39,19 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
22 changes: 10 additions & 12 deletions custom-update-agent/updateagent/update_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"os"
"sync"

"github.com/eclipse-kanto/container-management/containerm/log"
"github.com/eclipse-kanto/container-management/containerm/version"
"github.com/eclipse-kanto/example-applications/custom-update-agent/util"

"github.com/eclipse-kanto/update-manager/api"
Expand Down Expand Up @@ -60,11 +58,11 @@ func (updMgr *fileUpdateManager) Apply(ctx context.Context, activityID string, d
updMgr.applyLock.Lock()
defer updMgr.applyLock.Unlock()

log.Debug("processing desired state - start")
slog.Debug("processing desired state - start")
// create operation instance
internalDesiredState, err := toInternalDesiredState(desiredState, updMgr.domainName)
if err != nil {
log.ErrorErr(err, "could not parse desired state components as file configurations")
slog.Error("could not parse desired state components as file configurations", "error", err)
updMgr.eventCallback.HandleDesiredStateFeedbackEvent(updMgr.Name(), activityID, "", types.StatusIdentificationFailed, err.Error(), []*types.Action{})
return
}
Expand All @@ -75,36 +73,36 @@ func (updMgr *fileUpdateManager) Apply(ctx context.Context, activityID string, d
hasActions, err := newOperation.Identify()
if err != nil {
newOperation.Feedback(types.StatusIdentificationFailed, err.Error(), "")
log.ErrorErr(err, "processing desired state - identification phase failed")
slog.Error("processing desired state - identification phase failed", "error", err)
return
}
newOperation.Feedback(types.StatusIdentified, "", "")
if !hasActions {
log.Debug("processing desired state - identification phase completed, no actions identified, sending COMPLETE status")
slog.Debug("processing desired state - identification phase completed, no actions identified, sending COMPLETE status")
newOperation.Feedback(types.StatusCompleted, "", "")
return
}
updMgr.operation = newOperation
log.Debug("processing desired state - identification phase completed, waiting for commands...")
slog.Debug("processing desired state - identification phase completed, waiting for commands...")
}

// Command processes received desired state command.
func (updMgr *fileUpdateManager) Command(ctx context.Context, activityID string, command *types.DesiredStateCommand) {
if command == nil {
log.Error("Skipping received command for activityId %s, but no payload.", activityID)
slog.Warn(fmt.Sprintf("Skipping received command for activityId %s, but no payload.", activityID))
return
}
updMgr.applyLock.Lock()
defer updMgr.applyLock.Unlock()

operation := updMgr.operation
if operation == nil {
log.Warn("Ignoring received command %s for baseline %s and activityId %s, but no operation in progress.", command.Command, command.Baseline, activityID)
slog.Warn(fmt.Sprintf("Ignoring received command %s for baseline %s and activityId %s, but no operation in progress.", command.Command, command.Baseline, activityID))
return
}
if operation.GetActivityID() != activityID {
log.Warn("Ignoring received command %s for baseline %s and activityId %s, but not matching operation in progress [%s].",
command.Command, command.Baseline, activityID, operation.GetActivityID())
slog.Warn(fmt.Sprintf("Ignoring received command %s for baseline %s and activityId %s, but not matching operation in progress [%s].",
command.Command, command.Baseline, activityID, operation.GetActivityID()))
return
}
operation.Execute(command.Command, command.Baseline)
Expand Down Expand Up @@ -140,7 +138,7 @@ func (updMgr *fileUpdateManager) asSoftwareNode() *types.SoftwareNode {
return &types.SoftwareNode{
InventoryNode: types.InventoryNode{
ID: updMgr.Name() + "-update-agent",
Version: version.ProjectVersion,
Version: "1.0.0",
Name: updateManagerName,
Parameters: []*types.KeyValuePair{
{
Expand Down
4 changes: 2 additions & 2 deletions vehicle-simulator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ require github.com/eclipse/paho.mqtt.golang v1.4.3
require (
github.com/eclipse/ditto-clients-golang v0.0.0-20230504175246-3e6e17510ac4
github.com/gorilla/websocket v1.5.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
)
6 changes: 4 additions & 2 deletions vehicle-simulator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Loading