Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
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
3 changes: 1 addition & 2 deletions internal/cmd/cli/console/connect/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
)

// ResolveInstance resolves a name or ID to a compute instance ID.
Expand All @@ -31,7 +30,7 @@ func ResolveInstance(ctx context.Context, conn *grpc.ClientConn, key string) (st
)
resp, err := client.List(ctx, publicv1.ComputeInstancesListRequest_builder{
Filter: new(listFilter),
Limit: proto.Int32(2),
Limit: new(int32(2)),
}.Build())
if err != nil {
return "", fmt.Errorf("failed to look up compute instance: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/cli/create/cluster/create_cluster_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func (c *runnerContext) findTemplate(ctx context.Context) (result *publicv1.Clus
)
response, err := c.templatesClient.List(ctx, publicv1.ClusterTemplatesListRequest_builder{
Filter: new(filter),
Limit: proto.Int32(10),
Limit: new(int32(10)),
}.Build())
if err != nil {
return nil, fmt.Errorf("failed to list templates: %w", err)
Expand All @@ -387,7 +387,7 @@ func (c *runnerContext) findTemplate(ctx context.Context) (result *publicv1.Clus

// If we are here then no matches were found, we will show to the user some of the available templates:
response, err = c.templatesClient.List(ctx, publicv1.ClusterTemplatesListRequest_builder{
Limit: proto.Int32(10),
Limit: new(int32(10)),
}.Build())
if err != nil {
return nil, fmt.Errorf("failed to list templates: %w", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (c *runnerContext) findTemplate(ctx context.Context) (result *publicv1.Comp
)
response, err := c.templatesClient.List(ctx, publicv1.ComputeInstanceTemplatesListRequest_builder{
Filter: new(filter),
Limit: proto.Int32(10),
Limit: new(int32(10)),
}.Build())
if err != nil {
return nil, fmt.Errorf("failed to list templates: %w", err)
Expand All @@ -371,7 +371,7 @@ func (c *runnerContext) findTemplate(ctx context.Context) (result *publicv1.Comp

// If we are here then no matches were found, we will show to the user some of the available templates:
response, err = c.templatesClient.List(ctx, publicv1.ComputeInstanceTemplatesListRequest_builder{
Limit: proto.Int32(10),
Limit: new(int32(10)),
}.Build())
if err != nil {
return nil, fmt.Errorf("failed to list templates: %w", err)
Expand Down
3 changes: 1 addition & 2 deletions internal/cmd/cli/describe/cluster/describe_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"text/tabwriter"

"github.com/spf13/cobra"
"google.golang.org/protobuf/proto"

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
"github.com/osac-project/fulfillment-service/internal/config"
Expand Down Expand Up @@ -69,7 +68,7 @@ func (c *runnerContext) run(cmd *cobra.Command, args []string) error {
filter := buildFilter(ref)
listResponse, err := client.List(ctx, publicv1.ClustersListRequest_builder{
Filter: &filter,
Limit: proto.Int32(2),
Limit: new(int32(2)),
}.Build())
if err != nil {
return fmt.Errorf("failed to describe cluster: %w", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"time"

"github.com/spf13/cobra"
"google.golang.org/protobuf/proto"

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
"github.com/osac-project/fulfillment-service/internal/config"
Expand Down Expand Up @@ -70,7 +69,7 @@ func (c *runnerContext) run(cmd *cobra.Command, args []string) error {
filter := buildFilter(ref)
listResponse, err := client.List(ctx, publicv1.ComputeInstancesListRequest_builder{
Filter: &filter,
Limit: proto.Int32(2),
Limit: new(int32(2)),
}.Build())
if err != nil {
return fmt.Errorf("failed to describe compute instance: %w", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (
. "github.com/onsi/ginkgo/v2/dsl/core"
. "github.com/onsi/gomega"

"google.golang.org/protobuf/proto"

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
)

Expand Down Expand Up @@ -53,8 +51,8 @@ var _ = Describe("Describe Security Group", func() {
Ingress: []*publicv1.SecurityRule{
publicv1.SecurityRule_builder{
Protocol: publicv1.Protocol_PROTOCOL_TCP,
PortFrom: proto.Int32(80),
PortTo: proto.Int32(80),
PortFrom: new(int32(80)),
PortTo: new(int32(80)),
Ipv4Cidr: new("0.0.0.0/0"),
}.Build(),
},
Expand Down Expand Up @@ -111,8 +109,8 @@ var _ = Describe("Describe Security Group", func() {
Ingress: []*publicv1.SecurityRule{
publicv1.SecurityRule_builder{
Protocol: publicv1.Protocol_PROTOCOL_TCP,
PortFrom: proto.Int32(443),
PortTo: proto.Int32(443),
PortFrom: new(int32(443)),
PortTo: new(int32(443)),
}.Build(),
},
}.Build(),
Expand Down
3 changes: 1 addition & 2 deletions internal/cmd/cli/get/kubeconfig/get_kubeconfig_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
"gopkg.in/yaml.v3"

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
Expand Down Expand Up @@ -118,7 +117,7 @@ func (c *runnerContext) run(cmd *cobra.Command, args []string) error {
)
listResponse, err := client.List(ctx, publicv1.ClustersListRequest_builder{
Filter: new(listFilter),
Limit: proto.Int32(10),
Limit: new(int32(10)),
}.Build())
if err != nil {
return fmt.Errorf("failed to list clusters: %w", err)
Expand Down
3 changes: 1 addition & 2 deletions internal/cmd/cli/get/password/get_password_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
"github.com/osac-project/fulfillment-service/internal/config"
Expand Down Expand Up @@ -118,7 +117,7 @@ func (c *runnerContext) run(cmd *cobra.Command, args []string) error {
)
listResponse, err := client.List(ctx, publicv1.ClustersListRequest_builder{
Filter: new(listFilter),
Limit: proto.Int32(10),
Limit: new(int32(10)),
}.Build())
if err != nil {
return fmt.Errorf("failed to list clusters: %w", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ var _ = Describe("buildSpec", func() {
Id: "test-explicit-fields",
Spec: privatev1.ComputeInstanceSpec_builder{
Template: template,
Cores: proto.Int32(4),
MemoryGib: proto.Int32(8),
Cores: new(int32(4)),
MemoryGib: new(int32(8)),
RunStrategy: new("Always"),
SshKey: new("ssh-rsa AAAA..."),
Image: privatev1.ComputeInstanceImage_builder{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (t *task) delete(ctx context.Context) error {
listResp, err := t.r.projectsClient.List(ctx, &privatev1.ProjectsListRequest{
//TODO: Update to use metadata.project once OSAC-1064 is implemented
Filter: new(fmt.Sprintf("this.spec.parent == '%s'", t.project.GetId())),
Limit: proto.Int32(1), // We only need to know if any exist
Limit: new(int32(1)), // We only need to know if any exist
})
if err != nil {
// Transient error - retry later
Expand Down
2 changes: 1 addition & 1 deletion internal/servers/cluster_catalog_items_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ var _ = Describe("Cluster catalog items server", func() {
}

response, err := server.List(ctx, publicv1.ClusterCatalogItemsListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand Down
4 changes: 2 additions & 2 deletions internal/servers/cluster_templates_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var _ = Describe("Cluster templates server", func() {

// List the objects:
response, err := server.List(ctx, publicv1.ClusterTemplatesListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand All @@ -195,7 +195,7 @@ var _ = Describe("Cluster templates server", func() {
// List the objects:
response, err := server.List(ctx, publicv1.ClusterTemplatesListRequest_builder{
Filter: new("this.id.startsWith('my_template_')"),
Offset: proto.Int32(1),
Offset: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", count-1))
Expand Down
4 changes: 2 additions & 2 deletions internal/servers/clusters_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ var _ = Describe("Clusters server", func() {

// List the objects:
response, err := server.List(ctx, publicv1.ClustersListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand All @@ -722,7 +722,7 @@ var _ = Describe("Clusters server", func() {

// List the objects:
response, err := server.List(ctx, publicv1.ClustersListRequest_builder{
Offset: proto.Int32(1),
Offset: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", count-1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ var _ = Describe("Compute instance catalog items server", func() {
}

response, err := server.List(ctx, publicv1.ComputeInstanceCatalogItemsListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand Down
5 changes: 2 additions & 3 deletions internal/servers/compute_instance_templates_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/fieldmaskpb"

publicv1 "github.com/osac-project/fulfillment-service/internal/api/osac/public/v1"
Expand Down Expand Up @@ -210,7 +209,7 @@ var _ = Describe("Compute instance templates server", func() {

// List the objects with limit:
response, err := server.List(ctx, publicv1.ComputeInstanceTemplatesListRequest_builder{
Limit: proto.Int32(5),
Limit: new(int32(5)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response).ToNot(BeNil())
Expand All @@ -233,7 +232,7 @@ var _ = Describe("Compute instance templates server", func() {

// List the objects with offset:
response, err := server.List(ctx, publicv1.ComputeInstanceTemplatesListRequest_builder{
Offset: proto.Int32(5),
Offset: new(int32(5)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response).ToNot(BeNil())
Expand Down
17 changes: 8 additions & 9 deletions internal/servers/compute_instances_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/fieldmaskpb"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down Expand Up @@ -168,8 +167,8 @@ var _ = Describe("Compute instances server", func() {
},
},
SpecDefaults: privatev1.ComputeInstanceTemplateSpecDefaults_builder{
Cores: proto.Int32(2),
MemoryGib: proto.Int32(2),
Cores: new(int32(2)),
MemoryGib: new(int32(2)),
Image: privatev1.ComputeInstanceImage_builder{
SourceType: "registry",
SourceRef: "quay.io/containerdisks/fedora:latest",
Expand Down Expand Up @@ -269,7 +268,7 @@ var _ = Describe("Compute instances server", func() {

// List the objects with limit:
response, err := server.List(ctx, publicv1.ComputeInstancesListRequest_builder{
Limit: proto.Int32(5),
Limit: new(int32(5)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response).ToNot(BeNil())
Expand Down Expand Up @@ -299,7 +298,7 @@ var _ = Describe("Compute instances server", func() {

// List the objects with offset:
response, err := server.List(ctx, publicv1.ComputeInstancesListRequest_builder{
Offset: proto.Int32(5),
Offset: new(int32(5)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response).ToNot(BeNil())
Expand Down Expand Up @@ -351,8 +350,8 @@ var _ = Describe("Compute instances server", func() {
Object: publicv1.ComputeInstance_builder{
Spec: publicv1.ComputeInstanceSpec_builder{
Template: "general.small",
Cores: proto.Int32(4),
MemoryGib: proto.Int32(8),
Cores: new(int32(4)),
MemoryGib: new(int32(8)),
RunStrategy: new("Always"),
Image: publicv1.ComputeInstanceImage_builder{
SourceType: "registry",
Expand Down Expand Up @@ -496,8 +495,8 @@ var _ = Describe("Compute instances server", func() {
Object: publicv1.ComputeInstance_builder{
Spec: publicv1.ComputeInstanceSpec_builder{
Template: "mapping-template",
Cores: proto.Int32(8),
MemoryGib: proto.Int32(16),
Cores: new(int32(8)),
MemoryGib: new(int32(16)),
RunStrategy: new("Halted"),
}.Build(),
}.Build(),
Expand Down
4 changes: 2 additions & 2 deletions internal/servers/host_types_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var _ = Describe("Host types server", func() {

// List the objects:
response, err := server.List(ctx, publicv1.HostTypesListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand All @@ -176,7 +176,7 @@ var _ = Describe("Host types server", func() {

// List the objects:
response, err := server.List(ctx, publicv1.HostTypesListRequest_builder{
Offset: proto.Int32(1),
Offset: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", count-1))
Expand Down
5 changes: 2 additions & 3 deletions internal/servers/network_classes_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/fieldmaskpb"

privatev1 "github.com/osac-project/fulfillment-service/internal/api/osac/private/v1"
Expand Down Expand Up @@ -184,7 +183,7 @@ var _ = Describe("Network classes server", func() {

// List the objects via public server:
response, err := publicServer.List(ctx, publicv1.NetworkClassesListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand All @@ -199,7 +198,7 @@ var _ = Describe("Network classes server", func() {

// List the objects via public server:
response, err := publicServer.List(ctx, publicv1.NetworkClassesListRequest_builder{
Offset: proto.Int32(1),
Offset: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", count-1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var _ = Describe("Private cluster catalog items server", func() {
}

response, err := server.List(ctx, privatev1.ClusterCatalogItemsListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand Down
4 changes: 2 additions & 2 deletions internal/servers/private_cluster_templates_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ var _ = Describe("Private cluster templates server", func() {
// List the objects:
response, err := server.List(ctx, privatev1.ClusterTemplatesListRequest_builder{
Filter: new("this.metadata.name.startsWith('my-template-')"),
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand Down Expand Up @@ -212,7 +212,7 @@ var _ = Describe("Private cluster templates server", func() {
// List the objects:
response, err := server.List(ctx, privatev1.ClusterTemplatesListRequest_builder{
Filter: new("this.metadata.name.startsWith('my-template-')"),
Offset: proto.Int32(1),
Offset: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", count-1))
Expand Down
4 changes: 2 additions & 2 deletions internal/servers/private_clusters_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ var _ = Describe("Private clusters server", func() {

// List the objects:
response, err := server.List(ctx, privatev1.ClustersListRequest_builder{
Limit: proto.Int32(1),
Limit: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", 1))
Expand All @@ -556,7 +556,7 @@ var _ = Describe("Private clusters server", func() {

// List the objects:
response, err := server.List(ctx, privatev1.ClustersListRequest_builder{
Offset: proto.Int32(1),
Offset: new(int32(1)),
}.Build())
Expect(err).ToNot(HaveOccurred())
Expect(response.GetSize()).To(BeNumerically("==", count-1))
Expand Down
Loading
Loading