diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-12-02 19:45:22 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-12-02 19:45:22 +0300 |
commit | 4cc048fd0ada79860f28f41c93fd08f4e2f292f0 (patch) | |
tree | e0b0f3975527288b39a8903f37d0ee1da8ae1367 | |
parent | a452ff89165e29d018180e043f3eb0250d85e6e4 (diff) | |
parent | 4090cb296ceebbf3b0a6ee1a3fea1068dc6b78b3 (diff) |
Merge branch 'fix/gb/disable-deprecated-serverless-serving' into 'master'
Disable deprecated serverless serving and proxy
Closes #467
See merge request gitlab-org/gitlab-pages!400
-rw-r--r-- | internal/source/gitlab/factory.go | 22 | ||||
-rw-r--r-- | internal/source/gitlab/factory_test.go | 5 |
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)) }) } |