Skip to content

Commit

Permalink
Merge branch 'master' into sendToGitHub/gang-min-cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
msumner91 committed Sep 21, 2023
2 parents b22b7ca + 54e9d03 commit 3ad3ab9
Show file tree
Hide file tree
Showing 13 changed files with 570 additions and 217 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -1,22 +0,0 @@
name: autoupdate
on:
# This will trigger on all pushes to all branches.
push: {}
# Alternatively, you can only trigger if commits are pushed to certain branches, e.g.:
# push:
# branches:
# - master
# - unstable
jobs:
autoupdate:
name: autoupdate
runs-on: ubuntu-22.04
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
PR_LABELS: "auto-update"
MERGE_MSG: "Branch was auto-updated."
RETRY_COUNT: "5"
RETRY_SLEEP: "300"
MERGE_CONFLICT_ACTION: "fail"
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ permissions:

jobs:
lint:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/lint.yml
test:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/test.yml
# Virtual job that can be configured as a required check before a PR can be merged.
all-required-checks-done:
name: All required checks done
if: ${{ always() }}
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
needs:
- lint
- test
Expand Down
14 changes: 14 additions & 0 deletions cmd/testsuite/cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func testCmd(app *testsuite.App) *cobra.Command {
cmd.Flags().String("tests", "", "Test file pattern, e.g., './testcases/*.yaml'.")
cmd.Flags().String("junit", "", "Write a JUnit test report to this path.")
cmd.Flags().String("benchmark", "", "Write a benchmark test report to this path.")
cmd.Flags().String("prometheusPushgatewayUrl", "", "Push metrics to Prometheus pushgateway at this url.")
cmd.Flags().String("prometheusPushgatewayJobName", "armada-testsuite", "Metrics are annotated with with job=prometheusPushGatewayJobName.")
return cmd
}

Expand Down Expand Up @@ -64,6 +66,18 @@ func testCmdRunE(app *testsuite.App) func(cmd *cobra.Command, args []string) err
return errors.New("benchmark report not currently supported")
}

prometheusPushgatewayUrl, err := cmd.Flags().GetString("prometheusPushgatewayUrl")
if err != nil {
return errors.WithStack(err)
}
app.Params.PrometheusPushGatewayUrl = prometheusPushgatewayUrl

prometheusPushgatewayJobName, err := cmd.Flags().GetString("prometheusPushgatewayJobName")
if err != nil {
return errors.WithStack(err)
}
app.Params.PrometheusPushGatewayJobName = prometheusPushgatewayJobName

// Create a context that is cancelled on SIGINT/SIGTERM.
// Ensures test jobs are cancelled on ctrl-C.
ctx, cancel := context.WithCancel(context.Background())
Expand Down
2 changes: 1 addition & 1 deletion internal/lookout/ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
version: "detect",
},
},
extends: ["plugin:react/recommended", "plugin:@typescript-eslint/recommended", "prettier"],
extends: ["plugin:@typescript-eslint/recommended", "prettier"],
plugins: ["prettier", "eslint-plugin-import"],
rules: {
"prettier/prettier": [
Expand Down
6 changes: 6 additions & 0 deletions internal/lookout/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo

In the project directory, you can run:

### `yarn openapi`

This step requires Docker.

Generate the OpenAPI client code from the OpenAPI specification. This step is required to be run before the first time the application is run, and any time the OpenAPI specification is updated.

### `yarn start`

Runs the app in the development mode.\
Expand Down
10 changes: 5 additions & 5 deletions internal/lookout/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
},
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@emotion/styled": "^11.11.0",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.58",
"@mui/icons-material": "^5.14.3",
"@mui/lab": "^5.0.0-alpha.111",
"@mui/material": "^5.13.6",
"@mui/material": "^5.14.4",
"@tanstack/react-table": "^8.7.0",
"@testing-library/jest-dom": "^5.11.5",
"@testing-library/react": "^12.1.5",
Expand All @@ -34,7 +34,7 @@
"@types/js-yaml": "^4.0.0",
"@types/node": "^12.19.3",
"@types/react": "^16.14.43",
"@types/react-dom": "^16.9.9",
"@types/react-dom": "^16.9.19",
"@types/react-virtualized": "^9.21.10",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^5.61.0",
Expand All @@ -48,7 +48,7 @@
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react": "^7.33.1",
"jest-junit": "^16.0.0",
"js-yaml": "^4.0.0",
"notistack": "^2.0.8",
Expand All @@ -57,7 +57,7 @@
"query-string": "^6.13.7",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "6.14.1",
"react-router-dom": "6.14.2",
"react-scripts": "^5.0.1",
"react-truncate": "^2.4.0",
"react-virtualized": "^9.22.2",
Expand Down
1 change: 1 addition & 0 deletions internal/lookout/ui/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

.app-content {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
15 changes: 11 additions & 4 deletions internal/lookout/ui/src/components/lookoutV2/JobsTableCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@ import { matchForColumn } from "../../utils/jobsTableUtils"
import styles from "./JobsTableCell.module.css"
import { JobsTableFilter } from "./JobsTableFilter"


const sharedCellStyle = {
padding: 0,
"&:hover": {
opacity: 0.85,
},
overflowWrap: "normal",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
overflow: "hidden",
borderRight: "1px solid #cccccc",
}

const sharedCellStyleWithOpacity = {
...sharedCellStyle,
"&:hover": {
opacity: 0.85,
},
}

export interface HeaderCellProps {
header: Header<JobRow, unknown>
columnResizeMode: ColumnResizeMode
Expand Down Expand Up @@ -70,6 +75,7 @@ export function HeaderCell({
textOverflow: "ellipsis",
whiteSpace: "nowrap",
overflow: "hidden",
backgroundColor: "#f2f2f2",
}}
className={styles.headerCell}
/>
Expand Down Expand Up @@ -100,6 +106,7 @@ export function HeaderCell({
justifyContent: "space-between",
alignItems: "center",
margin: 0,
backgroundColor: "#f2f2f2",
}}
>
<div
Expand Down Expand Up @@ -203,7 +210,7 @@ export const BodyCell = ({ cell, rowIsGroup, rowIsExpanded, onExpandedChange, on
key={cell.id}
align={isRightAligned ? "right" : "left"}
sx={{
...sharedCellStyle,
...sharedCellStyleWithOpacity,
padding: "2px 8px 2px 8px",
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ describe("JobsTableContainer", () => {
await waitFor(() => {
const rows = getAllByRole("row")
// Order should be reversed now
expect(rows[rows.length - 2]).toHaveTextContent(sorted[0].jobId)
expect(rows[rows.length - 1]).toHaveTextContent(sorted[0].jobId)
})
})
})
Expand Down Expand Up @@ -561,7 +561,7 @@ describe("JobsTableContainer", () => {
async () => {
const table = await screen.findByRole("table", { name: "Jobs table" })
const rows = await within(table).findAllByRole("row")
expect(rows.length).toBe(nDataRows + 2) // One row per data row, plus the header and footer rows
expect(rows.length).toBe(nDataRows + 1) // One row per data row, plus the header
},
{ timeout: 3000 },
)
Expand Down
Loading

0 comments on commit 3ad3ab9

Please sign in to comment.