You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/03/23 17:31:41 UTC
[camel-k] branch master updated (b1350d8 -> 5bd1c46)
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git.
from b1350d8 chore(release): publish helm chart for 1.3.2
new 3d19ae1 fix: Do not use operator version to compute Integration digest
new 583f3ee fix: Do not use operator version to compute IntegrationKit digest
new 5bd1c46 test: Remove irrelevant operator upgrade test
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
e2e/common/upgrade_test.go | 43 -------------------------------------------
pkg/util/digest/digest.go | 9 ++++-----
2 files changed, 4 insertions(+), 48 deletions(-)
[camel-k] 01/03: fix: Do not use operator version to compute
Integration digest
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 3d19ae1bf1ed1754275c064aa0f11046cf0159e1
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 14:37:13 2021 +0100
fix: Do not use operator version to compute Integration digest
---
pkg/util/digest/digest.go | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pkg/util/digest/digest.go b/pkg/util/digest/digest.go
index 462aff2..2decff7 100644
--- a/pkg/util/digest/digest.go
+++ b/pkg/util/digest/digest.go
@@ -40,8 +40,8 @@ import (
// Produces a digest that can be used as docker image tag
func ComputeForIntegration(integration *v1.Integration) (string, error) {
hash := sha256.New()
- // Operator version is relevant
- if _, err := hash.Write([]byte(defaults.Version)); err != nil {
+ // Integration version is relevant
+ if _, err := hash.Write([]byte(integration.Status.Version)); err != nil {
return "", err
}
// Integration Kit is relevant
@@ -241,7 +241,6 @@ func sortedTraitSpecMapKeys(m map[string]v1.TraitSpec) []string {
return res
}
-// ComputeSHA1 ---
func ComputeSHA1(elem ...string) (string, error) {
file := path.Join(elem...)
[camel-k] 03/03: test: Remove irrelevant operator upgrade test
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 5bd1c4601c6dad7e81b12a326a75182e1a91a680
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 15:31:58 2021 +0100
test: Remove irrelevant operator upgrade test
---
e2e/common/upgrade_test.go | 43 -------------------------------------------
1 file changed, 43 deletions(-)
diff --git a/e2e/common/upgrade_test.go b/e2e/common/upgrade_test.go
index 4002f28..ede3a0c 100644
--- a/e2e/common/upgrade_test.go
+++ b/e2e/common/upgrade_test.go
@@ -27,8 +27,6 @@ import (
. "github.com/onsi/gomega"
- v1 "k8s.io/api/core/v1"
-
. "github.com/apache/camel-k/e2e/support"
"github.com/apache/camel-k/pkg/util/defaults"
)
@@ -55,44 +53,3 @@ func TestPlatformUpgrade(t *testing.T) {
Eventually(PlatformVersion(ns)).Should(Equal(defaults.Version))
})
}
-
-func TestIntegrationUpgrade(t *testing.T) {
- WithNewTestNamespace(t, func(ns string) {
- Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
- Eventually(PlatformVersion(ns)).Should(Equal(defaults.Version))
-
- // Run an integration
- Expect(Kamel("run", "-n", ns, "files/yaml.yaml").Execute()).To(Succeed())
- Eventually(IntegrationPodPhase(ns, "yaml"), TestTimeoutMedium).Should(Equal(v1.PodRunning))
- initialKit := IntegrationKit(ns, "yaml")()
-
- // Scale the operator down to zero
- Eventually(ScaleOperator(ns, 0)).Should(BeNil())
- Eventually(OperatorPod(ns)).Should(BeNil())
-
- // Change the version to an older one
- Expect(SetIntegrationVersion(ns, "yaml", "an.older.one")).To(Succeed())
- Expect(SetAllKitsVersion(ns, "an.older.one")).To(Succeed())
- Eventually(IntegrationVersion(ns, "yaml")).Should(Equal("an.older.one"))
- Eventually(KitsWithVersion(ns, "an.older.one")).Should(Equal(1))
- Eventually(KitsWithVersion(ns, defaults.Version)).Should(Equal(0))
-
- // Scale the operator up
- Eventually(ScaleOperator(ns, 1)).Should(BeNil())
- Eventually(OperatorPod(ns)).ShouldNot(BeNil())
- Eventually(OperatorPodPhase(ns)).Should(Equal(v1.PodRunning))
-
- // No auto-update expected
- Consistently(IntegrationVersion(ns, "yaml"), 3*time.Second).Should(Equal("an.older.one"))
-
- // Clear the integration status
- Expect(Kamel("rebuild", "yaml", "-n", ns).Execute()).To(Succeed())
-
- // Check the integration version change
- Eventually(IntegrationVersion(ns, "yaml")).Should(Equal(defaults.Version))
- Eventually(KitsWithVersion(ns, "an.older.one")).Should(Equal(1)) // old one is not recycled
- Eventually(KitsWithVersion(ns, defaults.Version)).Should(Equal(1))
- Eventually(IntegrationKit(ns, "yaml"), TestTimeoutMedium).ShouldNot(Equal(initialKit))
- Eventually(IntegrationPodPhase(ns, "yaml"), TestTimeoutMedium).Should(Equal(v1.PodRunning))
- })
-}
[camel-k] 02/03: fix: Do not use operator version to compute
IntegrationKit digest
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 583f3ee89473e8cc23f6763ac06596595af58c89
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Mar 23 14:40:48 2021 +0100
fix: Do not use operator version to compute IntegrationKit digest
---
pkg/util/digest/digest.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/util/digest/digest.go b/pkg/util/digest/digest.go
index 2decff7..c63259c 100644
--- a/pkg/util/digest/digest.go
+++ b/pkg/util/digest/digest.go
@@ -130,8 +130,8 @@ func ComputeForIntegration(integration *v1.Integration) (string, error) {
// Produces a digest that can be used as docker image tag
func ComputeForIntegrationKit(kit *v1.IntegrationKit) (string, error) {
hash := sha256.New()
- // Operator version is relevant
- if _, err := hash.Write([]byte(defaults.Version)); err != nil {
+ // Kit version is relevant
+ if _, err := hash.Write([]byte(kit.Status.Version)); err != nil {
return "", err
}