Skip to content

Commit

Permalink
Merge pull request #6026 from influxdata/smith/security
Browse files Browse the repository at this point in the history
chore: Update to go1.20
  • Loading branch information
jeffreyssmith2nd authored Feb 28, 2023
2 parents 6261caa + 640feda commit a9dcfcf
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 101 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ workflows:
jobs:
build:
environment:
DOCKER_TAG: chronograf-20220721
DOCKER_TAG: chronograf-20230228
GO111MODULE: "ON"
machine:
image: ubuntu-2004:202201-02
Expand All @@ -61,7 +61,7 @@ jobs:

deploy-nightly:
environment:
DOCKER_TAG: chronograf-20220721
DOCKER_TAG: chronograf-20230228
GO111MODULE: "ON"
machine:
image: ubuntu-2004:202201-02
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:

deploy-pre-release:
environment:
DOCKER_TAG: chronograf-20220721
DOCKER_TAG: chronograf-20230228
GO111MODULE: "ON"
machine:
image: ubuntu-2004:202201-02
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

deploy-release:
environment:
DOCKER_TAG: chronograf-20220721
DOCKER_TAG: chronograf-20230228
GO111MODULE: "ON"
machine:
image: ubuntu-2004:202201-02
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/chronograf-cypress-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.18.4'
go-version: '1.20.1'

- uses: actions/setup-node@v2
with:
Expand Down Expand Up @@ -121,4 +121,3 @@ jobs:
ui/cypress/videos/*.mp4
ui/cypress/screenshots/
ui/cypress/results/results-*.xml
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.12
FROM alpine:3.17

ENV PROTOBOARDS_PATH /usr/share/chronograf/protoboards
ENV CANNED_PATH /usr/share/chronograf/canned
Expand Down
12 changes: 7 additions & 5 deletions chronograf.go
Original file line number Diff line number Diff line change
Expand Up @@ -821,13 +821,15 @@ const MappingWildcard string = "*"
// explicit role within the organization.
//
// One can think of a mapping like so:
// Provider:Scheme:Group -> Organization
// github:oauth2:influxdata -> Happy
// beyondcorp:ldap:influxdata -> TheBillHilliettas
//
// Provider:Scheme:Group -> Organization
// github:oauth2:influxdata -> Happy
// beyondcorp:ldap:influxdata -> TheBillHilliettas
//
// Any of Provider, Scheme, or Group may be provided as a wildcard *
// github:oauth2:* -> MyOrg
// *:*:* -> AllOrg
//
// github:oauth2:* -> MyOrg
// *:*:* -> AllOrg
type Mapping struct {
ID string `json:"id"`
Organization string `json:"organizationId"`
Expand Down
12 changes: 6 additions & 6 deletions etc/Dockerfile_build
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ RUN gem install fpm
# Install node
ENV NODE_VERSION v16.14.2
RUN wget -q https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.gz; \
mkdir /usr/local/node; \
tar -xvf node-${NODE_VERSION}-linux-x64.tar.gz -C /usr/local/node --strip-components=1; \
rm -f node-${NODE_VERSION}-linux-x64.tar.gz
mkdir /usr/local/node; \
tar -xvf node-${NODE_VERSION}-linux-x64.tar.gz -C /usr/local/node --strip-components=1; \
rm -f node-${NODE_VERSION}-linux-x64.tar.gz
ENV PATH=/usr/local/node/bin:$PATH

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
Expand All @@ -33,12 +33,12 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \

# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.18.4
ENV GO_VERSION 1.20.1
ENV GO_ARCH amd64
ENV GO111MODULES ON
RUN wget https://golang.org/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH /usr/local/go/bin:$PATH

ENV PROJECT_DIR $GOPATH/src/github.com/influxdata/chronograf
Expand Down
5 changes: 5 additions & 0 deletions etc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ def get_current_commit(short=False):
out = run(command)
return out.strip('\'\n\r ')

def set_safe_directory():
out = run("git config --global --add safe.directory *")
return out.strip()

def get_current_branch():
"""Retrieve the current git branch.
"""
Expand Down Expand Up @@ -948,6 +952,7 @@ def main(args):
level=LOG_LEVEL,
format=log_format)

logging.info(set_safe_directory())
parser = argparse.ArgumentParser(description='InfluxDB build and packaging script.')
parser.add_argument('--verbose','-v','--debug',
action='store_true',
Expand Down
13 changes: 7 additions & 6 deletions filestore/filestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
//
// Resources that are storable in a file are:
// (CRUD refers to create, read, update, delete. An '_' means not supported)
// Apps(layouts) - _R__
// Dashboards - _RUD
// Kapacitors - _RUD
// Organizations - _R__
// Protoboards - _R__
// Sources - _RUD
//
// Apps(layouts) - _R__
// Dashboards - _RUD
// Kapacitors - _RUD
// Organizations - _R__
// Protoboards - _R__
// Sources - _RUD
//
// Caution should be taken when editing resources provided via the filestore,
// especially in a distributed environment as unexpected behavior may occur.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/influxdata/chronograf

go 1.18
go 1.20

require (
cloud.google.com/go/bigtable v1.10.0 // indirect
Expand Down
Loading

0 comments on commit a9dcfcf

Please sign in to comment.