Skip to content

Commit

Permalink
update go version in github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonpollack23 committed Sep 25, 2024
1 parent ce4239e commit 5bb26cf
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Improvements-647.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
component: runtime
kind: Improvements
body: Update go version for GitHub workflows
time: 2024-09-25T14:50:03.581885966+09:00
custom:
PR: "647"
8 changes: 4 additions & 4 deletions .github/workflows/stage-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ permissions: read-all

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOLANGCI_LINT_VERSION: v1.55
GO_VERSION: v1.21.x
GOLANGCI_LINT_VERSION: v1.60
GO_VERSION: v1.23.x

jobs:
lint:
Expand All @@ -22,7 +22,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: |
**/go.sum
- run: go mod tidy -go=1.21
- run: go mod tidy -go=1.23
- name: Fail if go mod tidy changed go.mod
run: |
if [ -n "$(git status --porcelain)" ]; then
Expand Down Expand Up @@ -50,6 +50,6 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.23.x
- name: Lint
run: make lint-copyright
2 changes: 1 addition & 1 deletion .github/workflows/stage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.21.x]
go-version: [1.23.x]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pulumi/pulumi-yaml

go 1.21
go 1.23

require (
github.com/blang/semver v3.5.1+incompatible
Expand Down
2 changes: 1 addition & 1 deletion pkg/pulumiyaml/analyser.go
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ func (tc *typeCache) typeConfig(r *Runner, node configNode) bool {

func (tc *typeCache) typeMissing(r *Runner, node missingNode) bool {
ctx := r.newContext(node)
ctx.errorf(node.key(), fmt.Sprintf("resource, variable, or config value %q not found", node.key().Value))
ctx.errorf(node.key(), "resource, variable, or config value %q not found", node.key().Value)
return false
}

Expand Down
13 changes: 7 additions & 6 deletions pkg/pulumiyaml/codegen/gen_program_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package codegen

import (
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -65,8 +66,8 @@ func (m FakePackage) ResolveResource(typeName string) (pulumiyaml.ResourceTypeTo
return pulumiyaml.ResourceTypeToken(typeName), nil
default:
msg := fmt.Sprintf("Unexpected type token in ResolveResource: %q", typeName)
m.t.Logf(msg)
return "", fmt.Errorf(msg)
m.t.Logf("%s", msg)
return "", errors.New(msg)
}
}

Expand Down Expand Up @@ -117,8 +118,8 @@ func (m FakePackage) ResolveFunction(typeName string) (pulumiyaml.FunctionTypeTo
return pulumiyaml.FunctionTypeToken(typeName), nil
}
msg := fmt.Sprintf("Unexpected type token in ResolveFunction: %q", typeName)
m.t.Logf(msg)
return "", fmt.Errorf(msg)
m.t.Logf("%s", msg)
return "", errors.New(msg)
}

func (m FakePackage) FunctionTypeHint(typeName pulumiyaml.FunctionTypeToken) *schema.Function {
Expand All @@ -133,8 +134,8 @@ func (m FakePackage) IsComponent(typeName pulumiyaml.ResourceTypeToken) (bool, e
return false, nil
}
msg := fmt.Sprintf("Unexpected type token in IsComponent: %q", typeName)
m.t.Logf(msg)
return false, fmt.Errorf(msg)
m.t.Logf("%s", msg)
return false, errors.New(msg)
}

func (m FakePackage) Name() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/pulumiyaml/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ func (e *programEvaluator) registerConfig(intm configNode) (interface{}, bool) {
if errors.Is(err, config.ErrMissingVar) && defaultValue != nil {
v = defaultValue
} else if err != nil {
return e.errorf(intmKey, err.Error())
return e.errorf(intmKey, "%s", err.Error())
}

contract.Assertf(v != nil, "let an uninitialized var slip through")
Expand Down

0 comments on commit 5bb26cf

Please sign in to comment.