Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2020-12-01 17:03:28 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2020-12-02 14:36:23 +0300
commit4090cb296ceebbf3b0a6ee1a3fea1068dc6b78b3 (patch)
treefeff79071d1432f0381ff6b310c94039b6666639
parentf520a339a6b7880170a65dfcddcef5afff4faaef (diff)
Disable deprecated serverless serving and proxy
Serverless serving has been deprecated, see https://gitlab.com/gitlab-org/gitlab-pages/-/issues/467 for more details.
-rw-r--r--internal/source/gitlab/factory.go22
-rw-r--r--internal/source/gitlab/factory_test.go5
2 files changed, 16 insertions, 11 deletions
diff --git a/internal/source/gitlab/factory.go b/internal/source/gitlab/factory.go
index 41f7ea56..b033a592 100644
--- a/internal/source/gitlab/factory.go
+++ b/internal/source/gitlab/factory.go
@@ -6,7 +6,6 @@ import (
"gitlab.com/gitlab-org/gitlab-pages/internal/serving"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk/local"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk/zip"
- "gitlab.com/gitlab-org/gitlab-pages/internal/serving/serverless"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab/api"
)
@@ -35,14 +34,19 @@ func fabricateServing(lookup api.LookupPath) serving.Serving {
case "zip":
return zip.Instance()
case "serverless":
- serving, err := serverless.NewFromAPISource(source.Serverless)
- if err != nil {
- log.WithError(err).Errorf("could not fabricate serving for project %d", lookup.ProjectID)
-
- break
- }
-
- return serving
+ log.Errorf("attempted to fabricate serverless serving for project %d", lookup.ProjectID)
+
+ // This feature has been disalbed, for more details see
+ // https://gitlab.com/gitlab-org/gitlab-pages/-/issues/467
+ //
+ // serving, err := serverless.NewFromAPISource(source.Serverless)
+ // if err != nil {
+ // log.WithError(err).Errorf("could not fabricate serving for project %d", lookup.ProjectID)
+ //
+ // break
+ // }
+ //
+ // return serving
}
return defaultServing()
diff --git a/internal/source/gitlab/factory_test.go b/internal/source/gitlab/factory_test.go
index 2f3e1994..46740d35 100644
--- a/internal/source/gitlab/factory_test.go
+++ b/internal/source/gitlab/factory_test.go
@@ -7,7 +7,6 @@ import (
"gitlab.com/gitlab-org/gitlab-pages/internal/fixture"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk"
- "gitlab.com/gitlab-org/gitlab-pages/internal/serving/serverless"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab/api"
)
@@ -59,6 +58,8 @@ func TestFabricateServing(t *testing.T) {
},
}
- require.IsType(t, &serverless.Serverless{}, fabricateServing(lookup))
+ // Serverless serving has been deprecated.
+ // require.IsType(t, &serverless.Serverless{}, fabricateServing(lookup))
+ require.IsType(t, &disk.Disk{}, fabricateServing(lookup))
})
}