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

Commit 98d234e

Browse files
Merge pull request #1807 from ibuildthecloud/table-out
Fix build cache issues
2 parents c0b37d4 + ebd5f0a commit 98d234e

File tree

41 files changed

+416
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+416
-224
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1.3-labs
22

33
FROM ghcr.io/acorn-io/images-mirror/tonistiigi/binfmt:qemu-v6.2.0 AS binfmt
4-
FROM ghcr.io/acorn-io/images-mirror/moby/buildkit:v0.10.6 AS buildkit
4+
FROM ghcr.io/acorn-io/images-mirror/moby/buildkit:v0.11.6 AS buildkit
55
FROM ghcr.io/acorn-io/images-mirror/registry:2.8.1 AS registry
66
FROM ghcr.io/acorn-io/images-mirror/rancher/klipper-lb:v0.3.5 AS klipper-lb
77

docs/docs/100-reference/01-command-line/acorn_install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ acorn install
2424
--allow-traffic-from-namespace strings Namespaces that are allowed to send network traffic to all Acorn apps
2525
--allow-user-annotation strings Allow these annotations to propagate to dependent objects, no effect if --ignore-user-labels-and-annotations not true
2626
--allow-user-label strings Allow these labels to propagate to dependent objects, no effect if --ignore-user-labels-and-annotations not true
27+
--allow-user-metadata-namespace strings Allow these namespaces to propagate labels and annotations to dependent objects, no effect if --ignore-user-labels-and-annotations not true
2728
--api-server-replicas int acorn-api deployment replica count
2829
--auto-upgrade-interval string For apps configured with automatic upgrades enabled, the interval at which to check for new versions. Upgrade intervals configured at the application level cannot be smaller than this. (default '5m' - 5 minutes)
2930
--aws-identity-provider-arn string ARN of cluster's OpenID Connect provider registered in AWS

go.mod

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ require (
2222
github.com/aws/aws-sdk-go-v2/config v1.18.23
2323
github.com/aws/aws-sdk-go-v2/service/iam v1.19.10
2424
github.com/containerd/console v1.0.3
25-
github.com/containerd/containerd v1.6.10
25+
github.com/containerd/containerd v1.6.20
26+
github.com/denisbrodbeck/machineid v1.0.1
2627
github.com/docker/cli v23.0.5+incompatible
2728
github.com/docker/docker-credential-helpers v0.7.0
2829
github.com/go-acme/lego/v4 v4.9.1
@@ -35,7 +36,7 @@ require (
3536
github.com/gorilla/websocket v1.5.0
3637
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de
3738
github.com/loft-sh/devspace v1.1.1-0.20221217093921-7604c5857f98
38-
github.com/moby/buildkit v0.10.6
39+
github.com/moby/buildkit v0.11.6
3940
github.com/opencontainers/go-digest v1.0.0
4041
github.com/opencontainers/image-spec v1.1.0-rc3
4142
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
@@ -48,7 +49,7 @@ require (
4849
github.com/spf13/cobra v1.7.0
4950
github.com/spf13/pflag v1.0.5
5051
github.com/stretchr/testify v1.8.4
51-
github.com/tonistiigi/fsutil v0.0.0-20220315205639-9ed612626da3
52+
github.com/tonistiigi/fsutil v0.0.0-20230407161946-9e7a6df48576
5253
github.com/wI2L/jsondiff v0.3.0
5354
golang.org/x/crypto v0.9.0
5455
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc
@@ -102,7 +103,7 @@ require (
102103
github.com/cespare/xxhash/v2 v2.2.0 // indirect
103104
github.com/cloudflare/circl v1.3.3 // indirect
104105
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
105-
github.com/containerd/continuity v0.3.0 // indirect
106+
github.com/containerd/continuity v0.3.1-0.20230206214859-2a963a2f56e8 // indirect
106107
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
107108
github.com/containerd/typeurl v1.0.2 // indirect
108109
github.com/coreos/go-semver v0.3.0 // indirect
@@ -195,8 +196,9 @@ require (
195196
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
196197
github.com/mitchellh/mapstructure v1.5.0 // indirect
197198
github.com/moby/locker v1.0.1 // indirect
199+
github.com/moby/patternmatcher v0.5.0 // indirect
198200
github.com/moby/spdystream v0.2.0 // indirect
199-
github.com/moby/sys/signal v0.6.0 // indirect
201+
github.com/moby/sys/signal v0.7.0 // indirect
200202
github.com/moby/term v0.5.0 // indirect
201203
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
202204
github.com/modern-go/reflect2 v1.0.2 // indirect

go.sum

Lines changed: 24 additions & 92 deletions
Large diffs are not rendered by default.

pkg/apis/api.acorn.io/v1/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ type Config struct {
426426
IgnoreUserLabelsAndAnnotations *bool `json:"ignoreUserLabelsAndAnnotations" name:"ignore-user-labels-and-annotations" usage:"Don't propagate user-defined labels and annotations to dependent objects"`
427427
AllowUserLabels []string `json:"allowUserLabels" name:"allow-user-label" usage:"Allow these labels to propagate to dependent objects, no effect if --ignore-user-labels-and-annotations not true"`
428428
AllowUserAnnotations []string `json:"allowUserAnnotations" name:"allow-user-annotation" usage:"Allow these annotations to propagate to dependent objects, no effect if --ignore-user-labels-and-annotations not true"`
429+
AllowUserMetadataNamespaces []string `json:"allowUserMetadataNamespaces" name:"allow-user-metadata-namespace" usage:"Allow these namespaces to propagate labels and annotations to dependent objects, no effect if --ignore-user-labels-and-annotations not true"`
429430
WorkloadMemoryDefault *int64 `json:"workloadMemoryDefault" name:"workload-memory-default" quantity:"true" usage:"Set the default memory for acorn workloads. Accepts binary suffixes (Ki, Mi, Gi, etc) and \".\" and \"_\" seperators (default 0)" short:"m"`
430431
WorkloadMemoryMaximum *int64 `json:"workloadMemoryMaximum" name:"workload-memory-maximum" quantity:"true" usage:"Set the maximum memory for acorn workloads. Accepts binary suffixes (Ki, Mi, Gi, etc) and \".\" and \"_\" seperators (default 0)"`
431432
UseCustomCABundle *bool `json:"useCustomCABundle" name:"use-custom-ca-bundle" usage:"Use CA bundle for admin supplied secret for all acorn control plane components. Defaults to false."`

pkg/apis/api.acorn.io/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/internal.acorn.io/v1/appstatus.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func (e *ExpressionError) String() string {
3030
if e.DependencyNotFound == nil {
3131
return "error [" + e.Error + "] expression [" + e.Expression + "]"
3232
}
33+
if e.Expression != "" {
34+
return fmt.Sprintf("missing %s [%s] from expression [%s]", e.DependencyNotFound.DependencyType, e.DependencyNotFound.Name, e.Expression)
35+
}
3336
return fmt.Sprintf("missing %s [%s]", e.DependencyNotFound.DependencyType, e.DependencyNotFound.Name)
3437
}
3538

pkg/apis/internal.acorn.io/v1/build.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,13 @@ type AcornImageBuildInstance struct {
9494
}
9595

9696
type AcornImageBuildInstanceSpec struct {
97-
BuilderName string `json:"builderName,omitempty" wrangler:"required"`
98-
Acornfile string `json:"acornfile,omitempty"`
99-
Profiles []string `json:"profiles,omitempty"`
100-
Platforms []Platform `json:"platforms,omitempty"`
101-
Args GenericMap `json:"args,omitempty"`
102-
VCS VCS `json:"vcs,omitempty"`
97+
ContextCacheKey string `json:"contextCacheKey,omitempty"`
98+
BuilderName string `json:"builderName,omitempty" wrangler:"required"`
99+
Acornfile string `json:"acornfile,omitempty"`
100+
Profiles []string `json:"profiles,omitempty"`
101+
Platforms []Platform `json:"platforms,omitempty"`
102+
Args GenericMap `json:"args,omitempty"`
103+
VCS VCS `json:"vcs,omitempty"`
103104
}
104105

105106
type AcornImageBuildInstanceStatus struct {

pkg/apis/internal.acorn.io/v1/unmarshal.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,6 @@ func (in *VolumeBinding) UnmarshalJSON(data []byte) error {
273273

274274
func impliedSecretsForContainer(app *AppSpec, container Container) {
275275
for _, env := range container.Environment {
276-
if strings.Contains(env.Secret.Name, ".") {
277-
continue
278-
}
279276
if _, ok := app.Secrets[env.Secret.Name]; env.Secret.Name != "" && !ok {
280277
app.Secrets[env.Secret.Name] = Secret{
281278
Type: "opaque",
@@ -406,6 +403,9 @@ func addImpliedResources(in *AppSpec) error {
406403

407404
for _, a := range in.Acorns {
408405
for _, volumeBinding := range a.Volumes {
406+
if strings.Contains(volumeBinding.Volume, ".") {
407+
continue
408+
}
409409
if _, ok := in.Volumes[volumeBinding.Volume]; !ok {
410410
in.Volumes[volumeBinding.Volume] = VolumeRequest{
411411
Size: volumeBinding.Size,
@@ -414,6 +414,9 @@ func addImpliedResources(in *AppSpec) error {
414414
}
415415
}
416416
for _, secretBinding := range a.Secrets {
417+
if strings.Contains(secretBinding.Secret, ".") {
418+
continue
419+
}
417420
if _, ok := in.Secrets[secretBinding.Secret]; !ok {
418421
in.Secrets[secretBinding.Secret] = Secret{
419422
Type: "opaque",

pkg/appdefinition/lookup.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package appdefinition
22

33
import (
4-
"reflect"
54
"strings"
65

76
v1 "github.com/acorn-io/runtime/pkg/apis/internal.acorn.io/v1"
@@ -93,12 +92,11 @@ func findAcornImage(imageData v1.ImagesData, image string, acornBuild *v1.AcornB
9392
if testBuild == nil {
9493
continue
9594
}
96-
if !reflect.DeepEqual(*acornBuild, *testBuild) {
95+
if !equality.Semantic.DeepEqual(*acornBuild, *testBuild) {
9796
continue
9897
}
9998
if build.ImageKey != "" {
100-
image, ok := imageData.Acorns[build.ImageKey]
101-
return image.Image, ok
99+
return findImageInImageData(imageData, build.ImageKey)
102100
}
103101
return image, image != ""
104102
}

0 commit comments

Comments
 (0)