Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package okteto for openSUSE:Factory checked 
in at 2022-12-21 16:07:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/okteto (Old)
 and      /work/SRC/openSUSE:Factory/.okteto.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "okteto"

Wed Dec 21 16:07:15 2022 rev:36 rq:1044042 version:2.10.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/okteto/okteto.changes    2022-12-17 
20:37:08.532801760 +0100
+++ /work/SRC/openSUSE:Factory/.okteto.new.1835/okteto.changes  2022-12-21 
16:07:16.906761969 +0100
@@ -1,0 +2,6 @@
+Wed Dec 21 09:49:29 UTC 2022 - ka...@b1-systems.de
+
+- Update to version 2.10.3:
+  * Fix endpoints name in compose (#3304) (#3305)
+
+-------------------------------------------------------------------

Old:
----
  okteto-2.10.2.tar.gz

New:
----
  okteto-2.10.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ okteto.spec ++++++
--- /var/tmp/diff_new_pack.JaCbtD/_old  2022-12-21 16:07:18.162768743 +0100
+++ /var/tmp/diff_new_pack.JaCbtD/_new  2022-12-21 16:07:18.170768786 +0100
@@ -19,7 +19,7 @@
 %define __arch_install_post export NO_BRP_STRIP_DEBUG=true
 
 Name:           okteto
-Version:        2.10.2
+Version:        2.10.3
 Release:        0
 Summary:        Develop your applications directly in your Kubernetes Cluster
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.JaCbtD/_old  2022-12-21 16:07:18.198768937 +0100
+++ /var/tmp/diff_new_pack.JaCbtD/_new  2022-12-21 16:07:18.198768937 +0100
@@ -3,10 +3,10 @@
     <param name="url">https://github.com/okteto/okteto</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">2.10.2</param>
+    <param name="revision">2.10.3</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">enable</param>
-    <param name="match-tag">2.10.2</param>
+    <param name="match-tag">2.10.3</param>
   </service>
   <service name="set_version" mode="disabled">
     <param name="basename">okteto</param>
@@ -16,7 +16,7 @@
     <param name="compression">gz</param>
   </service>
   <service name="go_modules" mode="disabled">
-    <param name="archive">okteto-2.10.2.tar.gz</param>
+    <param name="archive">okteto-2.10.3.tar.gz</param>
   </service>
 </services>
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.JaCbtD/_old  2022-12-21 16:07:18.218769044 +0100
+++ /var/tmp/diff_new_pack.JaCbtD/_new  2022-12-21 16:07:18.218769044 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/okteto/okteto</param>
-              <param 
name="changesrevision">1fad522d06e5be2426145d57e2d8391f4b22da9c</param></service></servicedata>
+              <param 
name="changesrevision">b991837a6b1e52309ad846fa58ea400643aa0a88</param></service></servicedata>
 (No newline at EOF)
 

++++++ okteto-2.10.2.tar.gz -> okteto-2.10.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okteto-2.10.2/integration/deploy/endpoints_test.go 
new/okteto-2.10.3/integration/deploy/endpoints_test.go
--- old/okteto-2.10.2/integration/deploy/endpoints_test.go      2022-12-14 
12:39:03.000000000 +0100
+++ new/okteto-2.10.3/integration/deploy/endpoints_test.go      2022-12-21 
09:33:15.000000000 +0100
@@ -425,3 +425,101 @@
        }
        require.NoError(t, commands.RunOktetoDestroy(oktetoPath, 
destroyOptions))
 }
+
+// Test_EndpointsFromOktetoManifest_NameOption tests the following scenario:
+// - Deploying a okteto manifest locally
+// - K8s Service manifest has auto-ingress, endpoints are automatically 
created when kubectl apply
+// - The endpoints declared at the manifest deploy section are accessible and 
have name of deploy option
+func Test_EndpointsFromOktetoManifest_NameOption(t *testing.T) {
+       t.Parallel()
+       oktetoPath, err := integration.GetOktetoPath()
+       require.NoError(t, err)
+
+       dir := t.TempDir()
+       require.NoError(t, createEndpointsFromOktetoManifestInferredName(dir))
+       require.NoError(t, createAppDockerfile(dir))
+       require.NoError(t, createK8sManifest(dir))
+
+       testNamespace := integration.GetTestNamespace("EndpointManifestNameOp", 
user)
+       namespaceOpts := &commands.NamespaceOptions{
+               Namespace:  testNamespace,
+               OktetoHome: dir,
+               Token:      token,
+       }
+       require.NoError(t, commands.RunOktetoCreateNamespace(oktetoPath, 
namespaceOpts))
+       defer commands.RunOktetoDeleteNamespace(oktetoPath, namespaceOpts)
+       require.NoError(t, commands.RunOktetoKubeconfig(oktetoPath, dir))
+       c, _, err := 
okteto.NewK8sClientProvider().Provide(kubeconfig.Get([]string{filepath.Join(dir,
 ".kube", "config")}))
+       require.NoError(t, err)
+
+       deployOptions := &commands.DeployOptions{
+               Workdir:    dir,
+               Namespace:  testNamespace,
+               OktetoHome: dir,
+               Token:      token,
+               Name:       "my test",
+       }
+       require.NoError(t, commands.RunOktetoDeploy(oktetoPath, deployOptions))
+
+       // Test that endpoint works - created by auto-ingress at k8s manifest
+       autoIngressURL := fmt.Sprintf("https://e2etest-%s.%s";, testNamespace, 
appsSubdomain)
+       require.NotEmpty(t, integration.GetContentFromURL(autoIngressURL, 
timeout))
+
+       // Test that endpoint works - created by okteto manifest
+       manifestEndpointURL := fmt.Sprintf("https://my-test-%s.%s";, 
testNamespace, appsSubdomain)
+       require.NotEmpty(t, integration.GetContentFromURL(manifestEndpointURL, 
timeout))
+
+       destroyOptions := &commands.DestroyOptions{
+               Workdir:    dir,
+               Namespace:  testNamespace,
+               OktetoHome: dir,
+               Name:           "my test",
+       }
+       require.NoError(t, commands.RunOktetoDestroy(oktetoPath, 
destroyOptions))
+
+       _, err = integration.GetService(context.Background(), testNamespace, 
"e2etest", c)
+       require.True(t, k8sErrors.IsNotFound(err))
+}
+
+// Test_EndpointsFromStackWithEndpoints_InferredName tests the following 
scenario:
+// - Deploying a stack manifest locally from a compose file with endpoints 
section
+// - The endpoints generated are accessible and name from deploy option
+func Test_EndpointsFromStackWith_NameOption(t *testing.T) {
+       t.Parallel()
+       oktetoPath, err := integration.GetOktetoPath()
+       require.NoError(t, err)
+
+       dir := t.TempDir()
+       require.NoError(t, createStackWithEndpointsInferredNameScenario(dir))
+
+       testNamespace := integration.GetTestNamespace("TEndpointsStackNameOp", 
user)
+       namespaceOpts := &commands.NamespaceOptions{
+               Namespace:  testNamespace,
+               OktetoHome: dir,
+               Token:      token,
+       }
+       require.NoError(t, commands.RunOktetoCreateNamespace(oktetoPath, 
namespaceOpts))
+       defer commands.RunOktetoDeleteNamespace(oktetoPath, namespaceOpts)
+       require.NoError(t, commands.RunOktetoKubeconfig(oktetoPath, dir))
+
+       deployOptions := &commands.DeployOptions{
+               Workdir:    dir,
+               Namespace:  testNamespace,
+               OktetoHome: dir,
+               Token:      token,
+               Name:       "my test",
+       }
+       require.NoError(t, commands.RunOktetoDeploy(oktetoPath, deployOptions))
+
+       // Test endpoints are accessible
+       nginxURL := fmt.Sprintf("https://my-test-%s.%s";, testNamespace, 
appsSubdomain)
+       require.NotEmpty(t, integration.GetContentFromURL(nginxURL, timeout))
+
+       destroyOptions := &commands.DestroyOptions{
+               Workdir:    dir,
+               Namespace:  testNamespace,
+               OktetoHome: dir,
+               Name:       "my test",
+       }
+       require.NoError(t, commands.RunOktetoDestroy(oktetoPath, 
destroyOptions))
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okteto-2.10.2/pkg/k8s/ingresses/translate.go 
new/okteto-2.10.3/pkg/k8s/ingresses/translate.go
--- old/okteto-2.10.2/pkg/k8s/ingresses/translate.go    2022-12-14 
12:39:03.000000000 +0100
+++ new/okteto-2.10.3/pkg/k8s/ingresses/translate.go    2022-12-21 
09:33:15.000000000 +0100
@@ -19,7 +19,9 @@
 
 // Translate translates the endpoints spec at compose or okteto manifest and 
returns an ingress
 func Translate(endpointName string, endpoint model.Endpoint, opts 
*TranslateOptions) *Ingress {
+       // endpointName could not be sanitized 
        if endpointName == "" {
+               // opts.Name is already sanitized- this should be clean version 
of name
                endpointName = opts.Name
        }
        return &Ingress{
@@ -31,7 +33,7 @@
 func translateV1(ingressName string, endpoint model.Endpoint, opts 
*TranslateOptions) *networkingv1.Ingress {
        return &networkingv1.Ingress{
                ObjectMeta: metav1.ObjectMeta{
-                       Name:        ingressName,
+                       Name:        format.ResourceK8sMetaString(ingressName),
                        Namespace:   opts.Namespace,
                        Labels:      setLabels(endpoint, opts),
                        Annotations: setAnnotations(endpoint),
@@ -53,7 +55,7 @@
 func translateV1Beta1(ingressName string, endpoint model.Endpoint, opts 
*TranslateOptions) *networkingv1beta1.Ingress {
        return &networkingv1beta1.Ingress{
                ObjectMeta: metav1.ObjectMeta{
-                       Name:        ingressName,
+                       Name:        format.ResourceK8sMetaString(ingressName),
                        Namespace:   opts.Namespace,
                        Labels:      setLabels(endpoint, opts),
                        Annotations: setAnnotations(endpoint),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okteto-2.10.2/pkg/model/stack.go 
new/okteto-2.10.3/pkg/model/stack.go
--- old/okteto-2.10.2/pkg/model/stack.go        2022-12-14 12:39:03.000000000 
+0100
+++ new/okteto-2.10.3/pkg/model/stack.go        2022-12-21 09:33:15.000000000 
+0100
@@ -238,7 +238,8 @@
        }
 
        if endpoint, ok := s.Endpoints[""]; ok {
-               s.Endpoints[s.Name] = endpoint
+               // s.Name should be sanitize and compliant with url format
+               s.Endpoints[format.ResourceK8sMetaString(s.Name)] = endpoint
                delete(s.Endpoints, "")
        }
 

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/okteto/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.okteto.new.1835/vendor.tar.gz differ: char 5, line 1

Reply via email to