Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
TMP
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Sep 25, 2023
1 parent 407cbff commit fe3e470
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64"
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
Expand All @@ -31,7 +31,7 @@ jobs:

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64"
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64"
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
Expand All @@ -67,7 +67,7 @@ jobs:

- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64"
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
Expand Down
14 changes: 7 additions & 7 deletions etcd-manager/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
],
)

http_archive(
name = "bazel_gazelle",
sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
],
)

Expand All @@ -28,7 +28,7 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

go_rules_dependencies()

go_register_toolchains(version = "1.19.9")
go_register_toolchains(version = "1.20.8")

gazelle_dependencies()

Expand Down
2 changes: 1 addition & 1 deletion etcd-manager/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
k8s.io/apimachinery v0.28.1
k8s.io/client-go v0.28.1
k8s.io/klog/v2 v2.100.1
k8s.io/kops v1.28.0-beta.2
k8s.io/kops v1.28.0
k8s.io/mount-utils v0.28.1
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/yaml v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions etcd-manager/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8=
k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kops v1.28.0-beta.2 h1:kTeOgn8iIF3T22+Q9KsdlxqmvyrgHFkRKvsCq67Z50s=
k8s.io/kops v1.28.0-beta.2/go.mod h1:h2uKSWUqA3C3yGLt118OYDF9b884TpM0wZwKyv5WGyY=
k8s.io/kops v1.28.0 h1:AQuRGuUm1tUBxXHpcb4RTg1CG9LMK0bbrQpgUcKgXdM=
k8s.io/kops v1.28.0/go.mod h1:h2uKSWUqA3C3yGLt118OYDF9b884TpM0wZwKyv5WGyY=
k8s.io/mount-utils v0.28.1 h1:oyPtn8ZVxniBfwSlQaBF4fr7QVNYzUuk+gkuxEJgil0=
k8s.io/mount-utils v0.28.1/go.mod h1:AyP8LmZSLgpGdFQr+vzHTerlPiGvXUdP99n98Er47jw=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
Expand Down
13 changes: 7 additions & 6 deletions etcd-manager/pkg/commands/vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package commands

import (
"bytes"
"context"
"encoding/json"
"fmt"
"os"
Expand Down Expand Up @@ -73,7 +74,7 @@ func (s *vfsStore) AddCommand(cmd *protoetcd.Command) error {

p := s.commandsBase.Join(name, CommandFilename)
klog.Infof("Adding command at %s: %v", p, cmd)
if err := p.WriteFile(bytes.NewReader([]byte(data)), nil); err != nil {
if err := p.WriteFile(context.TODO(), bytes.NewReader([]byte(data)), nil); err != nil {
return fmt.Errorf("error writing file %q: %v", p.Path(), err)
}
}
Expand All @@ -96,7 +97,7 @@ func (s *vfsStore) ListCommands() ([]Command, error) {
continue
}

data, err := f.ReadFile()
data, err := f.ReadFile(context.TODO())
if err != nil {
return nil, fmt.Errorf("error reading %s: %v", f, err)
}
Expand Down Expand Up @@ -134,7 +135,7 @@ func (s *vfsStore) RemoveCommand(command Command) error {

func (s *vfsStore) GetExpectedClusterSpec() (*protoetcd.ClusterSpec, error) {
p := s.commandsBase.Join(EtcdClusterSpec)
data, err := p.ReadFile()
data, err := p.ReadFile(context.TODO())
if err != nil {
if os.IsNotExist(err) {
// TODO: On S3, loop to try to establish consistency?
Expand All @@ -158,7 +159,7 @@ func (s *vfsStore) SetExpectedClusterSpec(spec *protoetcd.ClusterSpec) error {
}

p := s.commandsBase.Join(EtcdClusterSpec)
if err := p.WriteFile(bytes.NewReader([]byte(data)), nil); err != nil {
if err := p.WriteFile(context.TODO(), bytes.NewReader([]byte(data)), nil); err != nil {
return fmt.Errorf("error writing cluster spec file %s: %v", p.Path(), err)
}

Expand All @@ -169,7 +170,7 @@ func (s *vfsStore) IsNewCluster() (bool, error) {
p := s.commandsBase.Join(EtcdClusterCreated)

// Note that we use ReadFile so that we use a GET on S3, which is more consistent
data, err := p.ReadFile()
data, err := p.ReadFile(context.TODO())
if err != nil {
if os.IsNotExist(err) {
// TODO: On S3, loop to try to establish consistency?
Expand Down Expand Up @@ -198,7 +199,7 @@ func (s *vfsStore) MarkClusterCreated() error {
}

p := s.commandsBase.Join(EtcdClusterCreated)
if err := p.WriteFile(bytes.NewReader([]byte(data)), nil); err != nil {
if err := p.WriteFile(context.TODO(), bytes.NewReader([]byte(data)), nil); err != nil {
return fmt.Errorf("error creating cluster-creation marker file %s: %v", p.Path(), err)
}
return nil
Expand Down

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

1 change: 1 addition & 0 deletions etcd-manager/vendor/golang.org/x/sys/windows/BUILD.bazel

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

2 changes: 1 addition & 1 deletion etcd-manager/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ k8s.io/klog/v2/internal/clock
k8s.io/klog/v2/internal/dbg
k8s.io/klog/v2/internal/serialize
k8s.io/klog/v2/internal/severity
# k8s.io/kops v1.28.0-beta.2
# k8s.io/kops v1.28.0
## explicit; go 1.20
k8s.io/kops/pkg/try
k8s.io/kops/upup/pkg/fi/cloudup/terraformWriter
Expand Down

0 comments on commit fe3e470

Please sign in to comment.