Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
80183: roachtest: update django to 4.0.1 r=ZhouXing19 a=ZhouXing19

Fixes cockroachdb#80079

Release note: None

80254: cluster-ui: fix storybook config r=xinhaoz a=xinhaoz

Previously there were two PRs merged that fixed
the broken storybook config. These commits had
clashing changes that ended up breaking the
config. This commit consolidates the two PRs
to fix storybook.

Release note: None

80255: release: add Jira response to errors r=celiala a=rail

Previously, when a Jira request failed, the only detail was the
response code without any further information.

This patch adds the response body to the error.

Release note: None

Co-authored-by: Jane Xing <[email protected]>
Co-authored-by: Xin Hao Zhang <[email protected]>
Co-authored-by: Rail Aliiev <[email protected]>
  • Loading branch information
4 people committed Apr 20, 2022
4 parents e251e61 + 78f0251 + 2f9aa9b + 1fc9c7e commit 1ec4073
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
19 changes: 13 additions & 6 deletions pkg/cmd/release/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package main

import (
"fmt"
"io"
"strings"

"github.com/andygrunwald/go-jira"
Expand Down Expand Up @@ -90,13 +91,17 @@ func newJiraClient(baseURL string, username string, password string) (*jiraClien

// getIssueDetails stores a subset of details from jira.Issue into jiraIssue.
func (j *jiraClient) getIssueDetails(issueID string) (jiraIssue, error) {
issue, _, err := j.client.Issue.Get(issueID, nil)
issue, resp, err := j.client.Issue.Get(issueID, nil)
if err != nil {
return jiraIssue{}, err
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
return jiraIssue{}, fmt.Errorf("failed to get issue: %w. Response: %s", err, string(body))
}
customFields, _, err := j.client.Issue.GetCustomFields(issueID)
customFields, resp, err := j.client.Issue.GetCustomFields(issueID)
if err != nil {
return jiraIssue{}, err
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
return jiraIssue{}, fmt.Errorf("failed to get custom fields: %w. Response: %s", err, string(body))
}
return jiraIssue{
ID: issue.ID,
Expand Down Expand Up @@ -136,9 +141,11 @@ func (d jiraIssue) url() string {

// createJiraIssue creates a **real** JIRA issue.
func createJiraIssue(client *jiraClient, issue *jira.Issue) (jiraIssue, error) {
newIssue, _, err := client.client.Issue.Create(issue)
newIssue, resp, err := client.client.Issue.Create(issue)
if err != nil {
return jiraIssue{}, err
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
return jiraIssue{}, fmt.Errorf("failed to create issue: %w. Response: %s", err, string(body))
}
details, err := client.getIssueDetails(newIssue.ID)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/roachtest/tests/django.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
var djangoReleaseTagRegex = regexp.MustCompile(`^(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<point>\d+))?$`)
var djangoCockroachDBReleaseTagRegex = regexp.MustCompile(`^(?P<major>\d+)\.(?P<minor>\d+)$`)

var djangoSupportedTag = "cockroach-3.2.x"
var djangoCockroachDBSupportedTag = "3.2.1"
var djangoSupportedTag = "cockroach-4.0.x"
var djangoCockroachDBSupportedTag = "4.0.1"

func registerDjango(r registry.Registry) {
runDjango := func(
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// licenses/APL.txt.

const path = require("path");
const appConfig = require("../webpack.config")();
const appConfig = require("../webpack.config");

const customConfig = appConfig();

Expand Down

0 comments on commit 1ec4073

Please sign in to comment.