Skip to content

Commit

Permalink
switch replace to go.work
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander committed Mar 27, 2024
1 parent 2fa85a8 commit 7e148f9
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ controller/config/config.yaml
controller/**/cache
controller/**/log
!controller/internal/log
go.work.sum
10 changes: 10 additions & 0 deletions MAINTAIN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
This doc tracks how to maintain the source code of HTNN.

## Release a new version

To release a new version, please follow the steps below:

1. Create a new release branch `release/v${version}` from the main branch.
2. Update the `VERSION` file at the root of this repository.
3. Create tag `api/v${version}`, then update the `go.mod` which depend on `mosn.io/htnn/api`.
4. Remove the `go.work` file.
(TBD)

## Upgrade components

### Upgrade Istio
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ lint-spell: dev-tools
${DEV_TOOLS_IMAGE} \
make lint-spell-local

CODESPELL = codespell --skip '.git,.idea,test-envoy,go.mod,go.sum,*.svg,./site/public/**' --check-filenames --check-hidden --ignore-words ./.ignore_words
CODESPELL = codespell --skip '.git,.idea,test-envoy,go.mod,go.sum,go.work.sum,*.svg,./site/public/**' --check-filenames --check-hidden --ignore-words ./.ignore_words
.PHONY: lint-spell-local
lint-spell-local:
$(CODESPELL)
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

module mosn.io/htnn/api

// This module puts the API which can be used in the plugins and the filtermanager.
// This module puts the filtermanager and the API and test framework which can be used in the plugins.

go 1.21.5

Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ require (
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
mosn.io/htnn/api v0.0.0
mosn.io/htnn/api v0.2.1
sigs.k8s.io/controller-runtime v0.17.2
sigs.k8s.io/gateway-api v1.0.0
sigs.k8s.io/yaml v1.4.0
Expand Down Expand Up @@ -154,6 +154,3 @@ require (
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

// FIXME: replace it to go.work
replace mosn.io/htnn/api => ./api
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
mosn.io/htnn/api v0.2.1 h1:8tD+ckQXdgz2ZagIFqaUruBQ+AA4Csg5Jz9EBFboZ94=
mosn.io/htnn/api v0.2.1/go.mod h1:5Ho8etT5n0WBHUBZTY3hgMHSpSUZO/ofOBiKokhvluE=
sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0=
sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s=
sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs=
Expand Down
23 changes: 23 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright The HTNN Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// We use go.work and commit it to the repository so that we don't need to update the sub go modules'
// version during the development. Remember to remove this file and update the sub go modules' version
// when we draw a release.
go 1.21.5

use (
./api
.
)
56 changes: 29 additions & 27 deletions plugins/ext_auth/config.pb.go

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

0 comments on commit 7e148f9

Please sign in to comment.