Skip to content

Commit

Permalink
Use bosh-agent v2 Go module
Browse files Browse the repository at this point in the history
bosh-agent has been updated to use v2 in its go mod path to match its
releases. This ensures auto dependency bumps in CI happens correctly.
  • Loading branch information
rajathagasthya committed Dec 17, 2024
1 parent 2423354 commit e41251c
Show file tree
Hide file tree
Showing 53 changed files with 269 additions and 275 deletions.
4 changes: 2 additions & 2 deletions agentclient/mocks/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"time"

bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
"github.com/cppforlife/go-patch/patch"

cmdconf "github.com/cloudfoundry/bosh-cli/v7/cmd/config"
Expand Down
2 changes: 1 addition & 1 deletion cmd/create_env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"regexp"

mockhttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
mockhttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
Expand Down
4 changes: 2 additions & 2 deletions cmd/deployment_deleter.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
bihttpclient "github.com/cloudfoundry/bosh-utils/httpclient"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
Expand Down Expand Up @@ -197,7 +197,7 @@ func (c *deploymentDeleter) findCurrentDeploymentAndDelete(skipDrain bool, stage

return stage.PerformComplex("deleting deployment", func(deleteStage biui.Stage) error {
if !found {
//TODO: skip? would require adding skip support to PerformComplex
// TODO: skip? would require adding skip support to PerformComplex
c.logger.Debug(c.logTag, "No current deployment found...")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/deployment_deleter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

mockhttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
mockhttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
Expand Down
2 changes: 1 addition & 1 deletion cmd/deployment_preparer.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
bihttpclient "github.com/cloudfoundry/bosh-utils/httpclient"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
Expand Down
2 changes: 1 addition & 1 deletion cmd/deployment_state_manager.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
"github.com/cppforlife/go-patch/patch"
Expand Down
2 changes: 1 addition & 1 deletion cmd/deployment_state_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd_test
import (
"path/filepath"

mockhttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
mockhttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
Expand Down
2 changes: 1 addition & 1 deletion cmd/env_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"time"

bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
"github.com/cloudfoundry/bosh-utils/httpclient"
"github.com/cppforlife/go-patch/patch"

Expand Down
4 changes: 2 additions & 2 deletions cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"code.cloudfoundry.org/clock"

biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
boshcrypto "github.com/cloudfoundry/bosh-utils/crypto"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshfu "github.com/cloudfoundry/bosh-utils/fileutil"
Expand Down
4 changes: 2 additions & 2 deletions cmd/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"code.cloudfoundry.org/clock"
"code.cloudfoundry.org/clock/fakeclock"
"github.com/cloudfoundry/bosh-agent/agentclient"
mockhttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
mockhttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
boshsys "github.com/cloudfoundry/bosh-utils/system"
"github.com/cloudfoundry/bosh-utils/system/fakes"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
Expand Down
2 changes: 1 addition & 1 deletion cmd/scp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"errors"

bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
bosherr "github.com/cloudfoundry/bosh-utils/errors"

boshdir "github.com/cloudfoundry/bosh-cli/v7/director"
Expand Down
4 changes: 2 additions & 2 deletions cmd/scp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd_test
import (
"errors"

"github.com/cloudfoundry/bosh-agent/agentclient"
mockhttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
mockhttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"errors"

bihttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http"
bihttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http"
bosherr "github.com/cloudfoundry/bosh-utils/errors"

boshdir "github.com/cloudfoundry/bosh-cli/v7/director"
Expand Down
4 changes: 2 additions & 2 deletions cmd/ssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd_test
import (
"errors"

"github.com/cloudfoundry/bosh-agent/agentclient"
mockhttpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
mockhttpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
Expand Down
6 changes: 3 additions & 3 deletions deployment/deployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package deployment_test
import (
"time"

"github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
mock_httpagent "github.com/cloudfoundry/bosh-agent/agentclient/http/mocks"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
mock_httpagent "github.com/cloudfoundry/bosh-agent/v2/agentclient/http/mocks"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
Expand Down
8 changes: 4 additions & 4 deletions deployment/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package deployment_test
import (
"time"

biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
boshsys "github.com/cloudfoundry/bosh-utils/system"
Expand Down Expand Up @@ -140,7 +140,7 @@ var _ = Describe("Deployment", func() {
var err error
deployment, _, err = deploymentManager.FindCurrent()
Expect(err).ToNot(HaveOccurred())
//Note: deployment will be nil if the config has no vms, disks, or stemcells
// Note: deployment will be nil if the config has no vms, disks, or stemcells
})

AfterEach(func() {
Expand Down Expand Up @@ -267,7 +267,7 @@ var _ = Describe("Deployment", func() {
Expect(stemcellRecords).To(BeEmpty(), "expected no stemcell records")
})

//TODO: It'd be nice to test recovering after agent was responsive, before timeout (hard to do with gomock)
// TODO: It'd be nice to test recovering after agent was responsive, before timeout (hard to do with gomock)
Context("when agent is unresponsive", func() {
BeforeEach(func() {
// reduce timout & delay to reduce test duration
Expand Down
4 changes: 2 additions & 2 deletions deployment/instance/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package instance_test
import (
"time"

"github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
"github.com/cloudfoundry/bosh-utils/logger/loggerfakes"
"github.com/golang/mock/gomock"
Expand Down
4 changes: 2 additions & 2 deletions deployment/instance/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"time"

"github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
"github.com/golang/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion deployment/instance/state/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package state
import (
"errors"

"github.com/cloudfoundry/bosh-agent/agentclient"
"github.com/cloudfoundry/bosh-agent/v2/agentclient"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
Expand Down
2 changes: 1 addition & 1 deletion deployment/instance/state/builder_factory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package state

import (
biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
boshlog "github.com/cloudfoundry/bosh-utils/logger"

biblobstore "github.com/cloudfoundry/bosh-cli/v7/blobstore"
Expand Down
8 changes: 4 additions & 4 deletions deployment/instance/state/builder_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package state_test

import (
biac "github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
biac "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
"github.com/golang/mock/gomock"
Expand Down Expand Up @@ -101,7 +101,7 @@ var _ = Describe("Builder", func() {
},
},
Properties: biproperty.Map{
"fake-job-property": "fake-global-property-value", //overridden by job property value
"fake-job-property": "fake-global-property-value", // overridden by job property value
},
}

Expand Down Expand Up @@ -207,7 +207,7 @@ var _ = Describe("Builder", func() {
},
},
Properties: biproperty.Map{
"fake-job-property": "fake-global-property-value", //overridden by job property value
"fake-job-property": "fake-global-property-value", // overridden by job property value
},
}

Expand Down
4 changes: 2 additions & 2 deletions deployment/instance/state/mocks/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deployment/instance/state/remote_package_compiler.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package state

import (
biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bosherr "github.com/cloudfoundry/bosh-utils/errors"

biblobstore "github.com/cloudfoundry/bosh-cli/v7/blobstore"
Expand Down
2 changes: 1 addition & 1 deletion deployment/instance/state/remote_package_compiler_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package state_test

import (
biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion deployment/instance/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package state
import (
"strconv"

bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
)

type State interface {
Expand Down
2 changes: 1 addition & 1 deletion deployment/instance/state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package state_test
import (
. "github.com/cloudfoundry/bosh-cli/v7/deployment/instance/state"

bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
2 changes: 1 addition & 1 deletion deployment/manager_factory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package deployment

import (
biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"

biblobstore "github.com/cloudfoundry/bosh-cli/v7/blobstore"
bicloud "github.com/cloudfoundry/bosh-cli/v7/cloud"
Expand Down
2 changes: 1 addition & 1 deletion deployment/mocks/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deployment/vm/fakes/fake_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package fakes
import (
"time"

biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"

bidisk "github.com/cloudfoundry/bosh-cli/v7/deployment/disk"
bideplmanifest "github.com/cloudfoundry/bosh-cli/v7/deployment/manifest"
Expand Down
4 changes: 2 additions & 2 deletions deployment/vm/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"code.cloudfoundry.org/clock"
biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
Expand Down Expand Up @@ -136,7 +136,7 @@ func (m *manager) Create(stemcell bistemcell.CloudStemcell, deploymentManifest b
if err != nil {
cloudErr, ok := err.(bicloud.Error)
if ok && cloudErr.Type() == bicloud.NotImplementedError {
//ignore it
// ignore it
} else {
return nil, bosherr.WrapErrorf(err, "Setting VM metadata to %s", metadata)
}
Expand Down
2 changes: 1 addition & 1 deletion deployment/vm/manager_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package vm

import (
"code.cloudfoundry.org/clock"
biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
boshsys "github.com/cloudfoundry/bosh-utils/system"
boshuuid "github.com/cloudfoundry/bosh-utils/uuid"
Expand Down
2 changes: 1 addition & 1 deletion deployment/vm/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"code.cloudfoundry.org/clock"
fakebiagentclient "github.com/cloudfoundry/bosh-agent/agentclient/fakes"
fakebiagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient/fakes"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
Expand Down
2 changes: 1 addition & 1 deletion deployment/vm/mocks/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deployment/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"time"

biagentclient "github.com/cloudfoundry/bosh-agent/agentclient"
bias "github.com/cloudfoundry/bosh-agent/agentclient/applyspec"
biagentclient "github.com/cloudfoundry/bosh-agent/v2/agentclient"
bias "github.com/cloudfoundry/bosh-agent/v2/agentclient/applyspec"
bosherr "github.com/cloudfoundry/bosh-utils/errors"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
boshretry "github.com/cloudfoundry/bosh-utils/retrystrategy"
Expand Down
Loading

0 comments on commit e41251c

Please sign in to comment.