Skip to content

Commit

Permalink
Merge pull request #77 from credativ/release-7.5.34
Browse files Browse the repository at this point in the history
Release v7.5.34
  • Loading branch information
ntap-fge authored Oct 25, 2024
2 parents 14b624e + 164d42a commit 9ea56e2
Show file tree
Hide file tree
Showing 40 changed files with 3,542 additions and 291 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,3 @@ jobs:

- name: Run E2E test
run: e2e/run-suite

- name: Upload E2E test recordings
uses: actions/upload-artifact@v3
with:
name: e2e-test-recordings
path: e2e/suite1/videos
retention-days: 1
if: success() || failure()
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.6
go-version: 1.23.2
cache: true
cache-dependency-path: |
**/go.sum
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!-- 7.5.34 START -->

# 7.5.34 (2024-10-18)

- Upgrade Go to 1.23.2
- Upgrade Alpine to 3.20(.3)

<!-- 7.5.34 END -->

<!-- 7.5.33 START -->

# 7.5.33 (2024-08-09)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ENV NODE_ENV=production \
RUN yarn build

# Backend builder stage
FROM docker.io/library/golang:1.22.6-alpine3.20 as go-builder
FROM docker.io/library/golang:1.23.2-alpine3.20 as go-builder

RUN apk add --no-cache gcc g++

Expand All @@ -46,7 +46,7 @@ RUN go run build.go build && \
mv /go/src/github.com/credativ/plutono/bin/linux-$(go env GOARCH)/plutono-cli /go/src/github.com/credativ/plutono/bin/

# Final stage
FROM docker.io/library/alpine:3.20.2 as final
FROM docker.io/library/alpine:3.20.3 as final

ARG PL_UID="472"
ARG PL_GID="0"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build

FROM golang:1.15.1 AS go-builder
FROM golang:1.23.2 AS go-builder

WORKDIR /src/plutono

Expand Down
2 changes: 1 addition & 1 deletion devenv/docker/blocks/prometheus_random_data/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Dockerfile builds an image for a client_golang example.

# Builder image, where we build the example.
FROM golang:1.15.1 AS builder
FROM golang:1.23.2 AS builder
# Download prometheus/client_golang/examples/random first
RUN go get github.com/prometheus/client_golang/examples/random
WORKDIR /go/src/github.com/prometheus/client_golang
Expand Down
2 changes: 1 addition & 1 deletion e2e/run-suite
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ fi
cd packages/plutono-e2e

yarn $CMD --env BASE_URL=$URL,SLOWMO=$SLOWMO \
--config integrationFolder=../../e2e/$SUITE/specs,screenshotsFolder=../../e2e/$SUITE/screenshots,videosFolder=../../e2e/$SUITE/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false \
--config integrationFolder=../../e2e/$SUITE/specs,screenshotsFolder=../../e2e/$SUITE/screenshots,videosFolder=../../e2e/$SUITE/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false,video=false \
$PARAMS
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"packages": [
"packages/*"
],
"version": "7.5.33"
"version": "7.5.34"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "Apache-2.0",
"private": true,
"name": "plutono",
"version": "7.5.33",
"version": "7.5.34",
"repository": "github:credativ/plutono",
"scripts": {
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/jaeger-ui-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jaegertracing/jaeger-ui-components",
"version": "7.5.33",
"version": "7.5.34",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand All @@ -14,8 +14,8 @@
"typescript": "4.1.2"
},
"dependencies": {
"@credativ/plutono-data": "7.5.33",
"@credativ/plutono-ui": "7.5.33",
"@credativ/plutono-data": "7.5.34",
"@credativ/plutono-ui": "7.5.34",
"@types/classnames": "^2.2.7",
"@types/deep-freeze": "^0.1.1",
"@types/hoist-non-react-statics": "^3.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/plutono-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Plutono Team",
"license": "Apache-2.0",
"name": "@credativ/plutono-data",
"version": "7.5.33",
"version": "7.5.34",
"description": "Plutono Data Library",
"keywords": [
"typescript"
Expand Down
2 changes: 1 addition & 1 deletion packages/plutono-e2e-selectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Plutono Team",
"license": "Apache-2.0",
"name": "@credativ/plutono-e2e-selectors",
"version": "7.5.33",
"version": "7.5.34",
"description": "Plutono End-to-End Test Selectors Library",
"keywords": [
"cli",
Expand Down
4 changes: 2 additions & 2 deletions packages/plutono-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Plutono Team",
"license": "Apache-2.0",
"name": "@credativ/plutono-e2e",
"version": "7.5.33",
"version": "7.5.34",
"description": "Plutono End-to-End Test Library",
"keywords": [
"cli",
Expand Down Expand Up @@ -43,7 +43,7 @@
},
"types": "src/index.ts",
"dependencies": {
"@credativ/plutono-e2e-selectors": "7.5.33",
"@credativ/plutono-e2e-selectors": "7.5.34",
"@cypress/webpack-preprocessor": "4.1.3",
"@grafana/tsconfig": "^1.0.0-rc1",
"@mochajs/json-file-reporter": "^1.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/plutono-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Plutono Team",
"license": "Apache-2.0",
"name": "@credativ/plutono-runtime",
"version": "7.5.33",
"version": "7.5.34",
"description": "Plutono Runtime Library",
"keywords": [
"plutono",
Expand All @@ -22,8 +22,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@credativ/plutono-data": "7.5.33",
"@credativ/plutono-ui": "7.5.33",
"@credativ/plutono-data": "7.5.34",
"@credativ/plutono-ui": "7.5.34",
"systemjs": "0.20.19",
"systemjs-plugin-css": "0.1.37"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/plutono-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Plutono Team",
"license": "Apache-2.0",
"name": "@credativ/plutono-toolkit",
"version": "7.5.33",
"version": "7.5.34",
"description": "Plutono Toolkit",
"keywords": [
"plutono",
Expand All @@ -28,8 +28,8 @@
"dependencies": {
"@babel/core": "7.9.0",
"@babel/preset-env": "7.9.0",
"@credativ/plutono-data": "7.5.33",
"@credativ/plutono-ui": "7.5.33",
"@credativ/plutono-data": "7.5.34",
"@credativ/plutono-ui": "7.5.34",
"@grafana/eslint-config": "2.3.0",
"@grafana/tsconfig": "^1.0.0-rc1",
"@types/command-exists": "^1.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/plutono-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Plutono Team",
"license": "Apache-2.0",
"name": "@credativ/plutono-ui",
"version": "7.5.33",
"version": "7.5.34",
"description": "Plutono Components Library",
"keywords": [
"plutono",
Expand All @@ -27,8 +27,8 @@
},
"dependencies": {
"@credativ/plutono-aws-sdk": "0.0.4",
"@credativ/plutono-data": "7.5.33",
"@credativ/plutono-e2e-selectors": "7.5.33",
"@credativ/plutono-data": "7.5.34",
"@credativ/plutono-e2e-selectors": "7.5.34",
"@emotion/core": "10.0.27",
"@grafana/tsconfig": "^1.0.0-rc1",
"@iconscout/react-unicons": "1.1.4",
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func tryOAuthAutoLogin(c *models.ReqContext) bool {
}
for key := range setting.OAuthService.OAuthInfos {
redirectUrl := setting.AppSubUrl + "/login/" + key
log.Infof("OAuth auto login enabled. Redirecting to " + redirectUrl)
log.Infof("OAuth auto login enabled. Redirecting to %s", redirectUrl)
c.Redirect(redirectUrl, 307)
return true
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func searchUser(c *models.ReqContext) (*models.SearchUsersQuery, error) {
for _, user := range query.Result.Users {
user.AvatarUrl = dtos.GetGravatarUrl(user.Email)
user.AuthLabels = make([]string, 0)
if user.AuthModule != nil && len(user.AuthModule) > 0 {
if len(user.AuthModule) > 0 {
for _, authModule := range user.AuthModule {
user.AuthLabels = append(user.AuthLabels, GetAuthProviderLabel(authModule))
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/components/securejsondata/securejsondata.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (s SecureJsonData) DecryptedValue(key string) (string, bool) {
if value, ok := s[key]; ok {
decryptedData, err := util.Decrypt(value, setting.SecretKey)
if err != nil {
log.Fatalf(4, err.Error())
log.Fatalf(4, "%s", err.Error())
}
return string(decryptedData), true
}
Expand All @@ -30,7 +30,7 @@ func (s SecureJsonData) Decrypt() map[string]string {
for key, data := range s {
decryptedData, err := util.Decrypt(data, setting.SecretKey)
if err != nil {
log.Fatalf(4, err.Error())
log.Fatalf(4, "%s", err.Error())
}

decrypted[key] = string(decryptedData)
Expand All @@ -44,7 +44,7 @@ func GetEncryptedJsonData(sjd map[string]string) SecureJsonData {
for key, data := range sjd {
encryptedData, err := util.Encrypt([]byte(data), setting.SecretKey)
if err != nil {
log.Fatalf(4, err.Error())
log.Fatalf(4, "%s", err.Error())
}

encrypted[key] = encryptedData
Expand Down
9 changes: 6 additions & 3 deletions pkg/expr/mathexp/exp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func makeSeriesNullableTime(name string, labels data.Labels, points ...nullTimeT

func makeSeries(name string, labels data.Labels, points ...tp) Series {
newSeries := NewSeries(name, labels, 0, false, 1, true, len(points))
for idx, p := range points {
for idx := range points {
p := points[idx]
err := newSeries.SetPoint(idx, &p.t, p.f)
if err != nil {
panic(err)
Expand All @@ -49,7 +50,8 @@ func makeSeries(name string, labels data.Labels, points ...tp) Series {

func makeNoNullSeries(name string, labels data.Labels, points ...noNullTP) Series {
newSeries := NewSeries(name, labels, 0, false, 1, false, len(points))
for idx, p := range points {
for idx := range points {
p := points[idx]
err := newSeries.SetPoint(idx, &p.t, &p.f)
if err != nil {
panic(err)
Expand All @@ -60,7 +62,8 @@ func makeNoNullSeries(name string, labels data.Labels, points ...noNullTP) Serie

func makeSeriesTimeSecond(name string, labels data.Labels, points ...timeSecondTP) Series {
newSeries := NewSeries(name, labels, 1, false, 0, true, len(points))
for idx, p := range points {
for idx := range points {
p := points[idx]
err := newSeries.SetPoint(idx, &p.t, p.f)
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/infra/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func ReadLoggingConfig(modes []string, logsPath string, cfg *ini.File) error {
case "file":
fileName := sec.Key("file_name").MustString(filepath.Join(logsPath, "plutono.log"))
dpath := filepath.Dir(fileName)
if err := os.MkdirAll(dpath, os.ModePerm); err != nil {
if err := os.MkdirAll(dpath, 0o750); err != nil {
Root.Error("Failed to create directory", "dpath", dpath, "err", err)
return errutil.Wrapf(err, "failed to create log directory %q", dpath)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/login/social/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *SocialBase) httpGet(client *http.Client, url string) (response httpGetR
response = httpGetResponse{body, r.Header}

if r.StatusCode >= 300 {
err = fmt.Errorf(string(response.Body))
err = fmt.Errorf("%s", string(response.Body))
return
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/login/social/generic_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (s *SocialGenericOAuth) FetchPrivateEmail(client *http.Client) (string, err
IsConfirmed bool `json:"is_confirmed"`
}

response, err := s.httpGet(client, fmt.Sprintf(s.apiUrl+"/emails"))
response, err := s.httpGet(client, s.apiUrl+"/emails")
if err != nil {
s.log.Error("Error getting email address", "url", s.apiUrl+"/emails", "error", err)
return "", errutil.Wrap("Error getting email address", err)
Expand Down Expand Up @@ -394,7 +394,7 @@ func (s *SocialGenericOAuth) FetchTeamMemberships(client *http.Client) ([]int, b
Id int `json:"id"`
}

response, err := s.httpGet(client, fmt.Sprintf(s.apiUrl+"/teams"))
response, err := s.httpGet(client, s.apiUrl+"/teams")
if err != nil {
s.log.Error("Error getting team memberships", "url", s.apiUrl+"/teams", "error", err)
return nil, false
Expand Down Expand Up @@ -423,7 +423,7 @@ func (s *SocialGenericOAuth) FetchOrganizations(client *http.Client) ([]string,
Login string `json:"login"`
}

response, err := s.httpGet(client, fmt.Sprintf(s.apiUrl+"/orgs"))
response, err := s.httpGet(client, s.apiUrl+"/orgs")
if err != nil {
s.log.Error("Error getting organizations", "url", s.apiUrl+"/orgs", "error", err)
return nil, false
Expand Down
6 changes: 3 additions & 3 deletions pkg/login/social/github_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *SocialGithub) FetchPrivateEmail(client *http.Client) (string, error) {
Verified bool `json:"verified"`
}

response, err := s.httpGet(client, fmt.Sprintf(s.apiUrl+"/emails"))
response, err := s.httpGet(client, s.apiUrl+"/emails")
if err != nil {
return "", fmt.Errorf("Error getting email address: %s", err)
}
Expand All @@ -114,7 +114,7 @@ func (s *SocialGithub) FetchPrivateEmail(client *http.Client) (string, error) {
}

func (s *SocialGithub) FetchTeamMemberships(client *http.Client) ([]GithubTeam, error) {
url := fmt.Sprintf(s.apiUrl + "/teams?per_page=100")
url := s.apiUrl + "/teams?per_page=100"
hasMore := true
teams := make([]GithubTeam, 0)

Expand Down Expand Up @@ -220,7 +220,7 @@ func (s *SocialGithub) UserInfo(client *http.Client, token *oauth2.Token) (*Basi
Role: role,
}

organizationsUrl := fmt.Sprintf(s.apiUrl + "/orgs")
organizationsUrl := s.apiUrl + "/orgs"

if !s.IsTeamMember(client) {
return nil, ErrMissingTeamMembership
Expand Down
3 changes: 2 additions & 1 deletion pkg/models/datasource_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestDataSource_GetHttpTransport(t *testing.T) {
require.NoError(t, err)

assert.False(t, tr.transport.TLSClientConfig.InsecureSkipVerify)
require.Len(t, tr.transport.TLSClientConfig.RootCAs.Subjects(), 1)
require.Len(t, tr.transport.TLSClientConfig.RootCAs.Subjects(), 1) //nolint:staticcheck
assert.Equal(t, "server-name", tr.transport.TLSClientConfig.ServerName)
})

Expand Down Expand Up @@ -377,6 +377,7 @@ AU6WWoaAIEhhbWQfth/Diz3mivl1ARB+YqiWca2mjRPLTPcKJEURDVddQ423el0Q
llG/Sw5+FquFuChaA6l5KWy7F3bQyA==
-----END CERTIFICATE-----`

//nolint:gosec
const clientKey string = `-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA4yWJpbI0RQkozfu9YKXlsa5veUyJzJECoZDJj+rEP3IoozYV
u5xVyZaaDm+9OpBWXmuVD5zsYjw4Pqm2YWXxrbpygSSLtsWvxuSlLIFIRzmnbttn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
qr.Meta = simplejson.NewFromAny(pRes.JsonMeta)
}
if pRes.Error != "" {
qr.Error = fmt.Errorf(pRes.Error)
qr.Error = fmt.Errorf("%s", pRes.Error)
qr.ErrorString = pRes.Error
}
tR.Results[refID] = qr
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (pm *PluginManager) Init() error {
return err
}
if !exists {
if err = os.MkdirAll(pm.Cfg.PluginsPath, os.ModePerm); err != nil {
if err = os.MkdirAll(pm.Cfg.PluginsPath, 0o750); err != nil {
pm.log.Error("failed to create external plugins directory", "dir", pm.Cfg.PluginsPath, "error", err)
} else {
pm.log.Info("External plugins directory created", "directory", pm.Cfg.PluginsPath)
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (s *Server) ExitCode(reason error) int {
code := 1

if errors.Is(reason, context.Canceled) && s.shutdownReason != "" {
reason = fmt.Errorf(s.shutdownReason)
reason = fmt.Errorf("%s", s.shutdownReason)
code = 0
}

Expand Down
Loading

0 comments on commit 9ea56e2

Please sign in to comment.