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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2022-02-11 20:23:11 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2022-04-14 17:24:38 +0300
commit2f569aea44ddfbe443031edf9855a7ebae18095c (patch)
treeef413b9813d08812edcdeb486583dd93f91e34aa /internal
parentb5b8d0f1fda7f0bbcf2983bcb3405037dfa0a9d1 (diff)
Remove FF_DISABLE_REFRESH_TEMPORARY_ERROR feature flag
Changelog: removed
Diffstat (limited to 'internal')
-rw-r--r--internal/source/gitlab/cache/entry.go5
-rw-r--r--internal/source/gitlab/cache/entry_test.go28
2 files changed, 0 insertions, 33 deletions
diff --git a/internal/source/gitlab/cache/entry.go b/internal/source/gitlab/cache/entry.go
index 1c752913..ae06a215 100644
--- a/internal/source/gitlab/cache/entry.go
+++ b/internal/source/gitlab/cache/entry.go
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"net"
- "os"
"sync"
"time"
@@ -113,10 +112,6 @@ func (e *Entry) timedOut() bool {
// and is different to domain.ErrDomainDoesNotExist (this is an edge case to prevent serving
// a page right after being deleted).
func (e *Entry) hasTemporaryError() bool {
- if os.Getenv("FF_DISABLE_REFRESH_TEMPORARY_ERROR") == "true" {
- return false
- }
-
return e.response != nil &&
e.response.Error != nil &&
e.domainExists()
diff --git a/internal/source/gitlab/cache/entry_test.go b/internal/source/gitlab/cache/entry_test.go
index d50822ce..2ba26fd2 100644
--- a/internal/source/gitlab/cache/entry_test.go
+++ b/internal/source/gitlab/cache/entry_test.go
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"net/http"
- "os"
"testing"
"time"
@@ -119,33 +118,6 @@ func TestEntryRefresh(t *testing.T) {
require.Equal(t, storedEntry.Lookup(), entry.Lookup(), "lookup should be the same")
})
- t.Run("entry is the different when FF_DISABLE_REFRESH_TEMPORARY_ERROR is set to true", func(t *testing.T) {
- client.failed = false
- err := os.Setenv("FF_DISABLE_REFRESH_TEMPORARY_ERROR", "true")
-
- entry := newCacheEntry("test.gitlab.io", cc.EntryRefreshTimeout, cc.CacheExpiry)
-
- ctx, cancel := context.WithTimeout(context.Background(), cc.RetrievalTimeout)
- defer cancel()
-
- lookup := cache.retrieve(ctx, entry)
- require.NoError(t, lookup.Error)
-
- require.Eventually(t, entry.NeedsRefresh, 100*time.Millisecond, time.Millisecond, "entry should need refresh")
-
- require.NoError(t, err)
-
- cache.refreshFunc(entry)
-
- require.True(t, client.failed, "refresh should have failed")
-
- storedEntry := loadEntry(t, "test.gitlab.io", cache.store)
-
- require.Error(t, storedEntry.Lookup().Error, "resolving failed")
- require.True(t, storedEntry.refreshedOriginalTimestamp.IsZero())
- require.NotEqual(t, storedEntry.Lookup(), entry.Lookup(), "lookup should be different")
- })
-
t.Run("entry is different after it expired and calling refresh on it", func(t *testing.T) {
client.failed = false