mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Fix build and upgrade CI Go to 1.18.7
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
This commit is contained in:
parent
83d9ee3ab7
commit
8a4a659d73
4
.github/.github/workflows/test.yml
vendored
4
.github/.github/workflows/test.yml
vendored
|
@ -11,8 +11,8 @@ jobs:
|
||||||
- name: Upgrade golang
|
- name: Upgrade golang
|
||||||
run: |
|
run: |
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget https://dl.google.com/go/go1.17.7.linux-amd64.tar.gz
|
wget https://dl.google.com/go/go1.18.7.linux-amd64.tar.gz
|
||||||
tar -zxvf go1.17.7.linux-amd64.tar.gz
|
tar -zxvf go1.18.7.linux-amd64.tar.gz
|
||||||
sudo rm -fr /usr/local/go
|
sudo rm -fr /usr/local/go
|
||||||
sudo mv /tmp/go /usr/local/go
|
sudo mv /tmp/go /usr/local/go
|
||||||
cd -
|
cd -
|
||||||
|
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -11,8 +11,8 @@ jobs:
|
||||||
- name: Upgrade golang
|
- name: Upgrade golang
|
||||||
run: |
|
run: |
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget https://dl.google.com/go/go1.17.7.linux-amd64.tar.gz
|
wget https://dl.google.com/go/go1.18.7.linux-amd64.tar.gz
|
||||||
tar -zxvf go1.17.7.linux-amd64.tar.gz
|
tar -zxvf go1.18.7.linux-amd64.tar.gz
|
||||||
sudo rm -fr /usr/local/go
|
sudo rm -fr /usr/local/go
|
||||||
sudo mv /tmp/go /usr/local/go
|
sudo mv /tmp/go /usr/local/go
|
||||||
cd -
|
cd -
|
||||||
|
|
|
@ -597,7 +597,7 @@ func TestOMNullByteHandling(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "a{b\x00=\"hiih\"} 1",
|
input: "a{b\x00=\"hiih\"} 1",
|
||||||
err: "expected equal, got \"INVALID\"",
|
err: "expected equal, got \"INVALID\"",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "a\x00{b=\"ddd\"} 1",
|
input: "a\x00{b=\"ddd\"} 1",
|
||||||
|
|
|
@ -322,7 +322,7 @@ func TestPromNullByteHandling(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "a{b\x00=\"hiih\"} 1",
|
input: "a{b\x00=\"hiih\"} 1",
|
||||||
err: "expected equal, got \"INVALID\"",
|
err: "expected equal, got \"INVALID\"",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "a\x00{b=\"ddd\"} 1",
|
input: "a\x00{b=\"ddd\"} 1",
|
||||||
|
|
|
@ -470,7 +470,7 @@ instance: {{ $v.Labels.instance }}, value: {{ printf "%.0f" $v.Value }};
|
||||||
close(getDoneCh)
|
close(getDoneCh)
|
||||||
}()
|
}()
|
||||||
_, err = ruleWithQueryInTemplate.Eval(
|
_, err = ruleWithQueryInTemplate.Eval(
|
||||||
suite.Context(), evalTime, slowQueryFunc, nil, 0,
|
suite.Context(), 0, evalTime, slowQueryFunc, nil, 0,
|
||||||
)
|
)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1400,10 +1400,6 @@ func (db *DB) reloadBlocks() (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *DB) AllowOverlappingQueries() bool {
|
|
||||||
return db.opts.AllowOverlappingQueries || db.oooWasEnabled.Load()
|
|
||||||
}
|
|
||||||
|
|
||||||
func openBlocks(l log.Logger, dir string, loaded []*Block, chunkPool chunkenc.Pool, cache *hashcache.SeriesHashCache) (blocks []*Block, corrupted map[ulid.ULID]error, err error) {
|
func openBlocks(l log.Logger, dir string, loaded []*Block, chunkPool chunkenc.Pool, cache *hashcache.SeriesHashCache) (blocks []*Block, corrupted map[ulid.ULID]error, err error) {
|
||||||
bDirs, err := blockDirs(dir)
|
bDirs, err := blockDirs(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -3970,7 +3970,6 @@ func TestMetadataAssertInMemoryData(t *testing.T) {
|
||||||
// TODO(codesome): test more samples incoming once compaction has started. To verify new samples after the start
|
// TODO(codesome): test more samples incoming once compaction has started. To verify new samples after the start
|
||||||
//
|
//
|
||||||
// are not included in this compaction.
|
// are not included in this compaction.
|
||||||
>>>>>>> upstream/main
|
|
||||||
func TestOOOCompaction(t *testing.T) {
|
func TestOOOCompaction(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
|
|
||||||
|
|
21
tsdb/head.go
21
tsdb/head.go
|
@ -960,27 +960,6 @@ func (h *Head) updateMinOOOMaxOOOTime(mint, maxt int64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Head) updateMinOOOMaxOOOTime(mint, maxt int64) {
|
|
||||||
for {
|
|
||||||
lt := h.MinOOOTime()
|
|
||||||
if mint >= lt {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if h.minOOOTime.CAS(lt, mint) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for {
|
|
||||||
ht := h.MaxOOOTime()
|
|
||||||
if maxt <= ht {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if h.maxOOOTime.CAS(ht, maxt) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMinValidTime sets the minimum timestamp the head can ingest.
|
// SetMinValidTime sets the minimum timestamp the head can ingest.
|
||||||
func (h *Head) SetMinValidTime(minValidTime int64) {
|
func (h *Head) SetMinValidTime(minValidTime int64) {
|
||||||
h.minValidTime.Store(minValidTime)
|
h.minValidTime.Store(minValidTime)
|
||||||
|
|
|
@ -877,7 +877,7 @@ func (s *memSeries) cutNewHeadChunk(mint int64, chunkDiskMapper chunkDiskMapper,
|
||||||
return s.headChunk
|
return s.headChunk
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *memSeries) cutNewOOOHeadChunk(mint int64, chunkDiskMapper *chunks.ChunkDiskMapper) (*oooHeadChunk, chunks.ChunkDiskMapperRef) {
|
func (s *memSeries) cutNewOOOHeadChunk(mint int64, chunkDiskMapper chunkDiskMapper) (*oooHeadChunk, chunks.ChunkDiskMapperRef) {
|
||||||
ref := s.mmapCurrentOOOHeadChunk(chunkDiskMapper)
|
ref := s.mmapCurrentOOOHeadChunk(chunkDiskMapper)
|
||||||
|
|
||||||
s.oooHeadChunk = &oooHeadChunk{
|
s.oooHeadChunk = &oooHeadChunk{
|
||||||
|
|
|
@ -644,7 +644,7 @@ func (c *safeChunk) Iterator(reuseIter chunkenc.Iterator) chunkenc.Iterator {
|
||||||
|
|
||||||
// iterator returns a chunk iterator for the requested chunkID, or a NopIterator if the requested ID is out of range.
|
// iterator returns a chunk iterator for the requested chunkID, or a NopIterator if the requested ID is out of range.
|
||||||
// It is unsafe to call this concurrently with s.append(...) without holding the series lock.
|
// It is unsafe to call this concurrently with s.append(...) without holding the series lock.
|
||||||
func (s *memSeries) iterator(id chunks.HeadChunkID, isoState *isolationState, chunkDiskMapper *chunks.ChunkDiskMapper, memChunkPool *sync.Pool, it chunkenc.Iterator) chunkenc.Iterator {
|
func (s *memSeries) iterator(id chunks.HeadChunkID, isoState *isolationState, chunkDiskMapper chunkDiskMapper, memChunkPool *sync.Pool, it chunkenc.Iterator) chunkenc.Iterator {
|
||||||
c, garbageCollect, err := s.chunk(id, chunkDiskMapper, memChunkPool)
|
c, garbageCollect, err := s.chunk(id, chunkDiskMapper, memChunkPool)
|
||||||
// TODO(fabxc): Work around! An error will be returns when a querier have retrieved a pointer to a
|
// TODO(fabxc): Work around! An error will be returns when a querier have retrieved a pointer to a
|
||||||
// series's chunk, which got then garbage collected before it got
|
// series's chunk, which got then garbage collected before it got
|
||||||
|
|
Loading…
Reference in a new issue