Skip to content

Commit 66b77f0

Browse files
authored
Update go deps, move to go 1.19 (#291)
* Update go deps * Add retries to all windows commands * Fix for retry command * Try another way * Upgrade go to 1.19 * Add go version assertion * A diff for gofmt * Fix go version assertion * Drop some ee tests for now * Rewrite scoop installs * Add retry to yarn step * Add --force to docker remove prune * Fix for clickhouse connection * Fix for database= param test * Try weird things * Try pinning clickhouse image * Pin all images not to :latest * Fix oracle version * Correct oracle version * Try downgrading mongo? * Try deleting only this image after each run * Debug users.xml file * Try hardcoding overrides for clickhouse * Bump clickhouse down a version * Try only running clickhouse tests * Use docker style volume mount, not podman * Fix format * Drop unused users.xml file * Enable all tests * Drop io/ioutil
1 parent b734887 commit 66b77f0

32 files changed

+293
-264
lines changed

.github/workflows/ee_pull_requests.yml

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,46 +39,50 @@ jobs:
3939
- run: ./scripts/require_copyright.sh
4040
- run: yarn test
4141

42-
ee_macos_tests:
43-
name: "[EE] macOS Tests"
44-
runs-on: macos-latest
42+
#
43+
# WHILE THIS CODE ISNT UNDER ACTIVE DEVELOPMENT LETS DO A MINIMUM OF TESTS ON IT.
44+
#
4545

46-
steps:
47-
- uses: actions/checkout@master
48-
with:
49-
ref: ${{ github.ref }}
46+
# ee_macos_tests:
47+
# name: "[EE] macOS Tests"
48+
# runs-on: macos-latest
5049

51-
# FROM: https://github.com/actions/cache/blob/main/examples.md#node---yarn
52-
- name: Get yarn cache directory path
53-
id: yarn-cache-dir-path
54-
run: echo "::set-output name=dir::$(yarn cache dir)"
50+
# steps:
51+
# - uses: actions/checkout@master
52+
# with:
53+
# ref: ${{ github.ref }}
5554

56-
- uses: actions/cache@v2
57-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
58-
with:
59-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
60-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
61-
restore-keys: |
62-
${{ runner.os }}-yarn-
55+
# # FROM: https://github.com/actions/cache/blob/main/examples.md#node---yarn
56+
# - name: Get yarn cache directory path
57+
# id: yarn-cache-dir-path
58+
# run: echo "::set-output name=dir::$(yarn cache dir)"
6359

64-
- run: ./scripts/ci/prepare_macos.sh
65-
- run: yarn
66-
working-directory: ee
67-
- run: yarn test
68-
working-directory: ee
60+
# - uses: actions/cache@v2
61+
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
62+
# with:
63+
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
64+
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
65+
# restore-keys: |
66+
# ${{ runner.os }}-yarn-
6967

70-
ee_windows_tests:
71-
name: "[EE] Windows Tests"
72-
runs-on: windows-latest
68+
# - run: ./scripts/ci/prepare_macos.sh
69+
# - run: yarn
70+
# working-directory: ee
71+
# - run: yarn test
72+
# working-directory: ee
7373

74-
steps:
75-
- uses: actions/checkout@master
76-
with:
77-
ref: ${{ github.ref }}
74+
# ee_windows_tests:
75+
# name: "[EE] Windows Tests"
76+
# runs-on: windows-latest
7877

79-
- run: ./scripts/ci/prepare_windows.ps1
80-
shell: pwsh
81-
- run: yarn
82-
working-directory: ee
83-
- run: yarn test
84-
working-directory: ee
78+
# steps:
79+
# - uses: actions/checkout@master
80+
# with:
81+
# ref: ${{ github.ref }}
82+
83+
# - run: ./scripts/ci/prepare_windows.ps1
84+
# shell: pwsh
85+
# - run: yarn
86+
# working-directory: ee
87+
# - run: yarn test
88+
# working-directory: ee

Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ FROM node:17-bullseye
33
WORKDIR /datastation
44

55
# Install Golang
6-
RUN curl -L https://go.dev/dl/go1.18.linux-amd64.tar.gz -o /tmp/go.tar.gz && tar -C /usr/local -xzf /tmp/go.tar.gz
6+
RUN curl -L https://go.dev/dl/go1.19.linux-amd64.tar.gz -o /tmp/go.tar.gz && tar -C /usr/local -xzf /tmp/go.tar.gz
77
RUN ln -s /usr/local/go/bin/go /usr/bin/go

integration/clickhouse.test.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const path = require('path');
12
const cp = require('child_process');
23

34
const { basicDatabaseTest } = require('../desktop/panel/testutil');
@@ -17,18 +18,26 @@ describe('basic clickhouse tests', () => {
1718
async () => {
1819
await withDocker(
1920
{
20-
image: 'docker.io/yandex/clickhouse-server:latest',
21+
image: 'docker.io/yandex/clickhouse-server:22',
2122
port: 9000,
22-
args: [
23-
'-v',
24-
__dirname +
25-
'/../scripts/ci/clickhouse_users.xml:/etc/clickhouse-server/users.d/test.xml',
26-
'--ulimit',
27-
'nofile=262144:262144',
23+
env: {
24+
CLICKHOUSE_DB: 'test',
25+
CLICKHOUSE_USER: 'test',
26+
CLICKHOUSE_PASSWORD: 'test',
27+
},
28+
cmds: [
29+
`clickhouse-client -d test -u test --password test -q 'SELECT 1'`,
2830
],
29-
cmds: [`clickhouse-client -q 'CREATE DATABASE test'`],
3031
},
31-
() => basicDatabaseTest(t)
32+
() =>
33+
basicDatabaseTest(t, {
34+
clickhouse: {
35+
database: 'test',
36+
username: 'test',
37+
password: 'test',
38+
address: 'localhost',
39+
},
40+
})
3241
);
3342
},
3443
360_000

integration/cockroachdb.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('basic cockroachdb tests', () => {
1717
async () => {
1818
await withDocker(
1919
{
20-
image: 'docker.io/cockroachdb/cockroach:latest',
20+
image: 'docker.io/cockroachdb/cockroach:v22.1.6',
2121
port: 26257,
2222
args: ['--entrypoint', 'tail'],
2323
program: ['-f', '/dev/null'],

integration/cratedb.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('basic cratedb tests', () => {
2222
async () => {
2323
await withDocker(
2424
{
25-
image: 'docker.io/library/crate:latest',
25+
image: 'docker.io/library/crate:5.0.0',
2626
port: '5439:5432',
2727
program: ['crate', '-Cdiscovery.type=single-node'],
2828
cmds: [

integration/docker.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ module.exports.withDocker = async function (opts, cb) {
135135
cp.execSync('docker kill ' + containerId, { stdio: 'inherit' });
136136
console.log('Killed container');
137137

138+
//if (process.env.CI == 'true') {
139+
// Clear up disk space if possible since Github Actions doesn't
140+
// have a massive disk.
141+
// --force just doesn't prompt for confirmation
142+
cp.execSync('docker rmi --force ' + opts.image, { stdio: 'inherit' });
143+
//}
144+
138145
CONTAINERS[opts.image] = CONTAINERS[opts.image].filter(
139146
(c) => c === containerId
140147
);
141-
142-
if (process.env.CI == 'true') {
143-
// Clear up disk space if possible since Github Actions doesn't
144-
// have a massive disk.
145-
cp.execSync('docker image prune -a', { stdio: 'inherit' });
146-
}
147148
}
148149
};
149150

integration/mongo.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function testWithDocker(name, cb) {
2121
return withDocker(
2222
{
2323
port: 27017,
24-
image: 'docker.io/library/mongo:latest',
24+
image: 'docker.io/library/mongo:5',
2525
env: {
2626
MONGO_INITDB_ROOT_USERNAME: 'test',
2727
MONGO_INITDB_DATABASE: 'test',

integration/mysql.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('basic mysql tests', () => {
2323
async () => {
2424
await withDocker(
2525
{
26-
image: 'docker.io/library/mysql:latest',
26+
image: 'docker.io/library/mysql:8.0.30',
2727
port: '3306',
2828
env: {
2929
MYSQL_ROOT_PASSWORD: 'root',

integration/neo4j.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('basic neo4j tests', () => {
1313
test('basic test', async () => {
1414
await withDocker(
1515
{
16-
image: 'docker.io/library/neo4j:latest',
16+
image: 'docker.io/library/neo4j:4.4.10',
1717
port: 7687,
1818
env: {
1919
NEO4J_AUTH: 'neo4j/password',

integration/oracle.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('basic oracle tests', () => {
2424
async () => {
2525
await withDocker(
2626
{
27-
image: 'docker.io/gvenzl/oracle-xe:latest',
27+
image: 'docker.io/gvenzl/oracle-xe:21-slim',
2828
port: '1521',
2929
env: {
3030
ORACLE_RANDOM_PASSWORD: 'y',
@@ -46,7 +46,7 @@ describe('basic oracle tests', () => {
4646
async () => {
4747
await withDocker(
4848
{
49-
image: 'docker.io/gvenzl/oracle-xe:latest',
49+
image: 'docker.io/gvenzl/oracle-xe:21-slim',
5050
port: '1520:1521',
5151
env: {
5252
ORACLE_RANDOM_PASSWORD: 'y',
@@ -66,6 +66,6 @@ describe('basic oracle tests', () => {
6666
})
6767
);
6868
},
69-
DEFAULT_TIMEOUT
69+
DEFAULT_TIMEOUT * 10
7070
);
7171
});

0 commit comments

Comments
 (0)