gooddata 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +10 -24
- data/.github/workflows/check-extended.yaml +245 -0
- data/.github/workflows/check.yaml +190 -0
- data/.github/workflows/gate.yaml +200 -0
- data/.github/workflows/pre-merge.yml +22 -53
- data/.travis.yml +0 -35
- data/CHANGELOG.md +6 -0
- data/Dockerfile +3 -9
- data/Dockerfile.jruby +13 -1
- data/SDK_VERSION +1 -1
- data/VERSION +1 -1
- data/ci/bigquery/pom.xml +1 -1
- data/ci/postgresql/pom.xml +1 -1
- data/ci/snowflake/pom.xml +1 -1
- data/gooddata.gemspec +15 -3
- data/lib/gooddata/cloud_resources/mssql/mssql_client.rb +2 -1
- data/lib/gooddata/cloud_resources/mysql/mysql_client.rb +2 -1
- data/lib/gooddata/cloud_resources/postgresql/postgresql_client.rb +2 -1
- data/lib/gooddata/cloud_resources/redshift/redshift_client.rb +2 -1
- data/lib/gooddata/cloud_resources/snowflake/snowflake_client.rb +4 -1
- data/lib/gooddata/helpers/global_helpers.rb +1 -1
- data/lib/gooddata/lcm/actions/import_object_collections.rb +6 -2
- data/lib/gooddata/lcm/actions/synchronize_clients.rb +22 -2
- data/lib/gooddata/lcm/actions/synchronize_dataset_mappings.rb +6 -2
- data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +5 -1
- data/lib/gooddata/lcm/lcm2.rb +4 -0
- data/lib/gooddata/models/domain.rb +16 -4
- data/lib/gooddata/models/metadata/label.rb +21 -4
- data/lib/gooddata/models/project.rb +16 -2
- data/lib/gooddata/models/user_filters/user_filter_builder.rb +3 -2
- data/lib/gooddata/rest/connection.rb +13 -7
- metadata +85 -6
@@ -0,0 +1,200 @@
|
|
1
|
+
name: gate
|
2
|
+
on:
|
3
|
+
merge_group:
|
4
|
+
types:
|
5
|
+
- checks_requested
|
6
|
+
jobs:
|
7
|
+
prepare-env:
|
8
|
+
runs-on:
|
9
|
+
group: infra1-runners-arc
|
10
|
+
labels: runners-small
|
11
|
+
outputs:
|
12
|
+
branch: ${{ steps.branch.outputs.branch }}
|
13
|
+
ref: ${{ github.event.merge_group.head_ref }}
|
14
|
+
commit: ${{ github.event.merge_group.head_sha }}
|
15
|
+
pr_number: ${{ steps.pr-number.outputs.pr_number }}
|
16
|
+
project: ${{ github.repository }}
|
17
|
+
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- name: Get changed files
|
21
|
+
id: changed-files
|
22
|
+
uses: tj-actions/changed-files@v45
|
23
|
+
- name: Branch name
|
24
|
+
id: branch
|
25
|
+
run: |-
|
26
|
+
branch=$(echo "${{ github.event.merge_group.base_ref }}" | sed 's/^refs\/heads\///')
|
27
|
+
echo "branch=$branch" >> "$GITHUB_OUTPUT"
|
28
|
+
|
29
|
+
- name: PR number
|
30
|
+
id: pr-number
|
31
|
+
run: |-
|
32
|
+
pr_num=$(echo "${{ github.ref }}" | sed -n 's/.*pr-\([0-9]*\).*/\1/p')
|
33
|
+
echo "pr_number=$pr_num" >> "$GITHUB_OUTPUT"
|
34
|
+
|
35
|
+
gooddata-ruby-fossa-licenses-validate-LR-ticket-zuul:
|
36
|
+
runs-on:
|
37
|
+
group: infra1-runners-arc
|
38
|
+
labels: runners-small
|
39
|
+
needs:
|
40
|
+
- prepare-env
|
41
|
+
permissions:
|
42
|
+
contents: read
|
43
|
+
id-token: write
|
44
|
+
steps:
|
45
|
+
- name: Check if any matching file changed
|
46
|
+
id: changed-files
|
47
|
+
run: |
|
48
|
+
any_changed=false
|
49
|
+
patterns=('^NOTICE(S)?(.TXT)?$' '^LICENSE(S)?(.TXT)?$')
|
50
|
+
for file in ${{ needs.prepare-env.outputs.changed_files }}; do
|
51
|
+
for pattern in "${patterns[@]}"; do
|
52
|
+
if [[ $file =~ $pattern ]]; then
|
53
|
+
any_changed=true
|
54
|
+
fi
|
55
|
+
done
|
56
|
+
done
|
57
|
+
echo "any_changed=$any_changed" >> "$GITHUB_OUTPUT"
|
58
|
+
- name: Check if branch matches
|
59
|
+
id: branch-matches
|
60
|
+
run: |-
|
61
|
+
branch=${{ needs.prepare-env.outputs.branch }}
|
62
|
+
branch_matches=$([[ $branch =~ ^master$ ]] && echo true || echo false)
|
63
|
+
echo "branch_matches=$branch_matches" >> "$GITHUB_OUTPUT"
|
64
|
+
- name: Call Jenkins trigger
|
65
|
+
id: call-jenkins
|
66
|
+
uses: gooddata/github-actions-public/jenkins/trigger@master
|
67
|
+
with:
|
68
|
+
server: ${{ secrets.JENKINS_ADDRESS }}
|
69
|
+
folder: compliance
|
70
|
+
job-name: gooddata-ruby-fossa-licenses-validate-LR-ticket-zuul
|
71
|
+
vault-url: ${{ secrets.VAULT_ADDRESS }}
|
72
|
+
params: |-
|
73
|
+
{
|
74
|
+
"GH_BRANCH": "${{ needs.prepare-env.outputs.branch }}",
|
75
|
+
"GH_REF": "${{ needs.prepare-env.outputs.ref }}",
|
76
|
+
"GH_COMMIT": "${{ needs.prepare-env.outputs.commit }}",
|
77
|
+
"GH_URL": "git@github.com:",
|
78
|
+
"GH_CHANGE": "${{ needs.prepare-env.outputs.pr_number }}",
|
79
|
+
"GH_PROJECT": "${{ needs.prepare-env.outputs.project }}",
|
80
|
+
"BUILD_BY_GITHUB": "true",
|
81
|
+
"GH_PIPELINE": "gate"
|
82
|
+
}
|
83
|
+
comment-pr: 'true'
|
84
|
+
if: steps.changed-files.outputs.any_changed == 'true' && steps.branch-matches.outputs.branch_matches == 'true'
|
85
|
+
gooddata-ruby-lcm-promote-pipeline:
|
86
|
+
runs-on:
|
87
|
+
group: infra1-runners-arc
|
88
|
+
labels: runners-small
|
89
|
+
needs:
|
90
|
+
- gooddata-ruby-fossa-licenses-validate-LR-ticket-zuul
|
91
|
+
- prepare-env
|
92
|
+
permissions:
|
93
|
+
contents: read
|
94
|
+
id-token: write
|
95
|
+
steps:
|
96
|
+
- name: Check if any matching file changed
|
97
|
+
id: changed-files
|
98
|
+
run: |
|
99
|
+
any_changed=false
|
100
|
+
patterns=('^VERSION$')
|
101
|
+
for file in ${{ needs.prepare-env.outputs.changed_files }}; do
|
102
|
+
for pattern in "${patterns[@]}"; do
|
103
|
+
if [[ $file =~ $pattern ]]; then
|
104
|
+
any_changed=true
|
105
|
+
fi
|
106
|
+
done
|
107
|
+
done
|
108
|
+
echo "any_changed=$any_changed" >> "$GITHUB_OUTPUT"
|
109
|
+
- name: Check if all changed files match patterns
|
110
|
+
id: all-match
|
111
|
+
run: |-
|
112
|
+
any_didnt_match=false
|
113
|
+
patterns=('^k8s/.*$' '^.gdc-ii-config-chart.yaml$' '^Jenkinsfile-chart$')
|
114
|
+
for file in ${{ needs.prepare-env.outputs.changed_files }}; do
|
115
|
+
matched=false
|
116
|
+
for pattern in "${patterns[@]}"; do
|
117
|
+
if [[ $file =~ $pattern ]]; then
|
118
|
+
matched=true
|
119
|
+
fi
|
120
|
+
done
|
121
|
+
if [[ $matched == false ]]; then
|
122
|
+
any_didnt_match=true
|
123
|
+
fi
|
124
|
+
done
|
125
|
+
echo "any_didnt_match=$any_didnt_match" >> "$GITHUB_OUTPUT"
|
126
|
+
|
127
|
+
- name: Check if branch matches
|
128
|
+
id: branch-matches
|
129
|
+
run: |-
|
130
|
+
branch=${{ needs.prepare-env.outputs.branch }}
|
131
|
+
branch_matches=$([[ $branch =~ ^master$ ]] && echo true || echo false)
|
132
|
+
echo "branch_matches=$branch_matches" >> "$GITHUB_OUTPUT"
|
133
|
+
- name: Call Jenkins trigger
|
134
|
+
id: call-jenkins
|
135
|
+
uses: gooddata/github-actions-public/jenkins/trigger@master
|
136
|
+
with:
|
137
|
+
server: ${{ secrets.JENKINS_II_ADDRESS }}
|
138
|
+
folder: gooddata-ruby
|
139
|
+
job-name: gooddata-ruby-lcm-promote-pipeline
|
140
|
+
vault-url: ${{ secrets.VAULT_ADDRESS }}
|
141
|
+
params: |-
|
142
|
+
{
|
143
|
+
"GH_BRANCH": "${{ needs.prepare-env.outputs.branch }}",
|
144
|
+
"GH_REF": "${{ needs.prepare-env.outputs.ref }}",
|
145
|
+
"GH_COMMIT": "${{ needs.prepare-env.outputs.commit }}",
|
146
|
+
"GH_URL": "git@github.com:",
|
147
|
+
"GH_CHANGE": "${{ needs.prepare-env.outputs.pr_number }}",
|
148
|
+
"GH_PROJECT": "${{ needs.prepare-env.outputs.project }}",
|
149
|
+
"BUILD_BY_GITHUB": "true",
|
150
|
+
"GH_PIPELINE": "gate"
|
151
|
+
}
|
152
|
+
comment-pr: 'true'
|
153
|
+
if: steps.changed-files.outputs.any_changed == 'true' && steps.all-match.outputs.any_didnt_match == 'true' && steps.branch-matches.outputs.branch_matches == 'true'
|
154
|
+
gooddata-ruby-gitops-deploy-pipeline:
|
155
|
+
runs-on:
|
156
|
+
group: infra1-runners-arc
|
157
|
+
labels: runners-small
|
158
|
+
needs:
|
159
|
+
- gooddata-ruby-lcm-promote-pipeline
|
160
|
+
- prepare-env
|
161
|
+
permissions:
|
162
|
+
contents: read
|
163
|
+
id-token: write
|
164
|
+
steps:
|
165
|
+
- name: Call Jenkins trigger
|
166
|
+
id: call-jenkins
|
167
|
+
uses: gooddata/github-actions-public/jenkins/trigger@master
|
168
|
+
with:
|
169
|
+
server: ${{ secrets.JENKINS_II_ADDRESS }}
|
170
|
+
folder: gooddata-ruby
|
171
|
+
job-name: gooddata-ruby-gitops-deploy-pipeline
|
172
|
+
vault-url: ${{ secrets.VAULT_ADDRESS }}
|
173
|
+
params: |-
|
174
|
+
{
|
175
|
+
"GH_BRANCH": "${{ needs.prepare-env.outputs.branch }}",
|
176
|
+
"GH_REF": "${{ needs.prepare-env.outputs.ref }}",
|
177
|
+
"GH_COMMIT": "${{ needs.prepare-env.outputs.commit }}",
|
178
|
+
"GH_URL": "git@github.com:",
|
179
|
+
"GH_CHANGE": "${{ needs.prepare-env.outputs.pr_number }}",
|
180
|
+
"GH_PROJECT": "${{ needs.prepare-env.outputs.project }}",
|
181
|
+
"BUILD_BY_GITHUB": "true",
|
182
|
+
"GH_PIPELINE": "gate"
|
183
|
+
}
|
184
|
+
comment-pr: 'true'
|
185
|
+
ready-to-merge:
|
186
|
+
runs-on:
|
187
|
+
group: infra1-runners-arc
|
188
|
+
labels: runners-small
|
189
|
+
if: always()
|
190
|
+
needs:
|
191
|
+
- prepare-env
|
192
|
+
- gooddata-ruby-fossa-licenses-validate-LR-ticket-zuul
|
193
|
+
- gooddata-ruby-lcm-promote-pipeline
|
194
|
+
- gooddata-ruby-gitops-deploy-pipeline
|
195
|
+
steps:
|
196
|
+
- name: Check if needed jobs succeeded
|
197
|
+
uses: re-actors/alls-green@release/v1
|
198
|
+
with:
|
199
|
+
allowed-skips: ${{ toJSON(needs) }}
|
200
|
+
jobs: ${{ toJSON(needs) }}
|
@@ -6,14 +6,12 @@ on:
|
|
6
6
|
- master
|
7
7
|
jobs:
|
8
8
|
unit-tests:
|
9
|
-
runs-on: ubuntu-
|
9
|
+
runs-on: ubuntu-22.04
|
10
10
|
strategy:
|
11
11
|
matrix:
|
12
12
|
ruby-version: [2.5, 2.6, 2.7.6, 3.2.1, jruby-9.2.21, jruby-9.3.14, jruby-9.4.1]
|
13
13
|
steps:
|
14
|
-
- uses: actions/checkout@
|
15
|
-
with:
|
16
|
-
fetch-depth: 0
|
14
|
+
- uses: actions/checkout@v4
|
17
15
|
- uses: ruby/setup-ruby@v1
|
18
16
|
with:
|
19
17
|
ruby-version: ${{ matrix.ruby-version }}
|
@@ -21,52 +19,23 @@ jobs:
|
|
21
19
|
- run: bundle exec rake test:unit
|
22
20
|
- run: bundle exec rake test:unit
|
23
21
|
continue-on-error: true
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
- uses: actions/checkout@v3
|
45
|
-
- uses: ruby/setup-ruby@v1
|
46
|
-
with:
|
47
|
-
ruby-version: ${{ matrix.ruby-version }}
|
48
|
-
bundler-cache: true
|
49
|
-
- name: run tests
|
50
|
-
run: bundle exec rake test:unit
|
51
|
-
pronto-code-review:
|
52
|
-
runs-on: ubuntu-latest
|
53
|
-
steps:
|
54
|
-
- uses: actions/checkout@v3
|
55
|
-
with:
|
56
|
-
fetch-depth: 0
|
57
|
-
- uses: ruby/setup-ruby@v1
|
58
|
-
with:
|
59
|
-
ruby-version: 3.2
|
60
|
-
bundler-cache: true
|
61
|
-
- name: run pronto-code-review
|
62
|
-
run: |
|
63
|
-
set -x
|
64
|
-
git remote add upstream https://github.com/gooddata/gooddata-ruby.git
|
65
|
-
git fetch upstream $GITHUB_BASE_REF
|
66
|
-
failed=0
|
67
|
-
PRONTO_FLAY_MASS_THRESHOLD=50 bundle exec pronto run -c upstream/$GITHUB_BASE_REF --exit-code lib || failed=1
|
68
|
-
PRONTO_FLAY_MASS_THRESHOLD=100 bundle exec pronto run -c upstream/$GITHUB_BASE_REF --exit-code spec || failed=1
|
69
|
-
if [ "$failed" -ne 0 ] ; then
|
70
|
-
exit 1
|
71
|
-
fi
|
72
|
-
shell: bash
|
22
|
+
# pronto-code-review:
|
23
|
+
# runs-on: ubuntu-latest
|
24
|
+
# steps:
|
25
|
+
# - uses: actions/checkout@v4
|
26
|
+
# - uses: ruby/setup-ruby@v1
|
27
|
+
# with:
|
28
|
+
# ruby-version: 3.2
|
29
|
+
# bundler-cache: true
|
30
|
+
# - name: run pronto-code-review
|
31
|
+
# run: |
|
32
|
+
# set -x
|
33
|
+
# git remote add upstream https://github.com/gooddata/gooddata-ruby.git
|
34
|
+
# git fetch upstream $GITHUB_BASE_REF
|
35
|
+
# failed=0
|
36
|
+
# PRONTO_FLAY_MASS_THRESHOLD=50 bundle exec pronto run -c upstream/$GITHUB_BASE_REF --exit-code lib || failed=1
|
37
|
+
# PRONTO_FLAY_MASS_THRESHOLD=100 bundle exec pronto run -c upstream/$GITHUB_BASE_REF --exit-code spec || failed=1
|
38
|
+
# if [ "$failed" -ne 0 ] ; then
|
39
|
+
# exit 1
|
40
|
+
# fi
|
41
|
+
# shell: bash
|
data/.travis.yml
CHANGED
@@ -311,41 +311,6 @@ jobs:
|
|
311
311
|
|
312
312
|
# AFTER MERGE UNIT TESTS ON ALTERNATIVE PLATFORM
|
313
313
|
|
314
|
-
- name: unit tests 2.3
|
315
|
-
stage: after-merge
|
316
|
-
script: bundle exec rake test:unit
|
317
|
-
os: osx
|
318
|
-
osx_image: xcode7.3
|
319
|
-
rvm: 2.3
|
320
|
-
|
321
|
-
- name: unit tests 2.4
|
322
|
-
stage: after-merge
|
323
|
-
script: bundle exec rake test:unit
|
324
|
-
os: osx
|
325
|
-
osx_image: xcode9.4
|
326
|
-
rvm: 2.4.3
|
327
|
-
|
328
|
-
- name: unit tests 2.5
|
329
|
-
stage: after-merge
|
330
|
-
script: bundle exec rake test:unit
|
331
|
-
os: osx
|
332
|
-
osx_image: xcode9
|
333
|
-
rvm: 2.5
|
334
|
-
|
335
|
-
- name: unit tests 2.6
|
336
|
-
stage: after-merge
|
337
|
-
script: bundle exec rake test:unit
|
338
|
-
os: osx
|
339
|
-
osx_image: xcode9
|
340
|
-
rvm: 2.6
|
341
|
-
|
342
|
-
- name: unit tests jruby-9.1.14
|
343
|
-
stage: after-merge
|
344
|
-
script: bundle exec rake test:unit
|
345
|
-
os: osx
|
346
|
-
rvm: jruby-9.1.14
|
347
|
-
osx_image: xcode9.4
|
348
|
-
|
349
314
|
- stage: gem-release
|
350
315
|
name: deploy MRI gem
|
351
316
|
rvm: 2.3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# GoodData Ruby SDK Changelog
|
2
2
|
|
3
|
+
## 2.3.2
|
4
|
+
- CONFIG: Support new version of activesupport library
|
5
|
+
|
6
|
+
## 2.3.1
|
7
|
+
- BUGFIX: MSF-25977 Add missing dependencies to support jruby3.1
|
8
|
+
|
3
9
|
## 2.3.0
|
4
10
|
- BUGFIX: MSF-25800 Add SSLErrorWaitReadable error to retry error list
|
5
11
|
- MSF-24148: Upgrade LCM image to run with JRuby latest version 9.4.1
|
data/Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-
|
1
|
+
FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202501070635.05b6a77
|
2
2
|
|
3
3
|
ARG RVM_VERSION=stable
|
4
4
|
ARG JRUBY_VERSION=9.4.1.0
|
@@ -6,10 +6,10 @@ ARG JRUBY_VERSION=9.4.1.0
|
|
6
6
|
LABEL image_name="GDC LCM Bricks"
|
7
7
|
LABEL maintainer="LCM <lcm@gooddata.com>"
|
8
8
|
LABEL git_repository_url="https://github.com/gooddata/gooddata-ruby/"
|
9
|
-
LABEL parent_image="020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-
|
9
|
+
LABEL parent_image="020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202501070635.05b6a77"
|
10
10
|
|
11
11
|
# which is required by RVM
|
12
|
-
RUN yum install -y which patch make git maven procps \
|
12
|
+
RUN yum install -y which patch make unzip gnupg git maven procps gzip \
|
13
13
|
&& yum clean all \
|
14
14
|
&& rm -rf /var/cache/yum
|
15
15
|
|
@@ -33,9 +33,6 @@ RUN rvm install jruby-${JRUBY_VERSION} && gem update --system \
|
|
33
33
|
&& gem install bundler -v 2.4.6 \
|
34
34
|
&& gem install rake -v 13.0.6
|
35
35
|
|
36
|
-
# Make sure java default running with java8
|
37
|
-
RUN update-alternatives --set java java-1.8.0-openjdk.x86_64
|
38
|
-
|
39
36
|
WORKDIR /src
|
40
37
|
|
41
38
|
RUN groupadd -g 48 apache \
|
@@ -80,9 +77,6 @@ RUN cp -rf ci/mysql/target/*.jar ./lib/gooddata/cloud_resources/mysql/drivers/
|
|
80
77
|
|
81
78
|
RUN bundle install
|
82
79
|
|
83
|
-
# Check to make sure Java version is always Java8
|
84
|
-
RUN java_version=$(java -version 2>&1) && echo "$java_version" | grep 'version.*1.8' || (echo "Java version is not 1.8" && exit 1)
|
85
|
-
|
86
80
|
ARG GIT_COMMIT=unspecified
|
87
81
|
ARG BRICKS_VERSION=unspecified
|
88
82
|
LABEL git_commit=$GIT_COMMIT
|
data/Dockerfile.jruby
CHANGED
@@ -2,7 +2,7 @@ FROM jruby:9.4.1.0
|
|
2
2
|
|
3
3
|
MAINTAINER Tomas Korcak <korczis@gmail.com>
|
4
4
|
|
5
|
-
RUN apt-get update && apt-get install -y curl make gcc git g++ python binutils-gold gnupg libstdc++6 cmake
|
5
|
+
RUN apt-get update && apt-get install -y curl make gcc git g++ python binutils-gold gnupg libstdc++6 cmake maven
|
6
6
|
|
7
7
|
# Switch to directory with sources
|
8
8
|
WORKDIR /src
|
@@ -15,6 +15,18 @@ RUN gem update --system \
|
|
15
15
|
|
16
16
|
ADD . .
|
17
17
|
|
18
|
+
# build postgresql dependencies
|
19
|
+
RUN mvn -f ci/postgresql/pom.xml clean install -P binary-packaging \
|
20
|
+
&& cp -rf ci/postgresql/target/*.jar ./lib/gooddata/cloud_resources/postgresql/drivers/
|
21
|
+
|
22
|
+
# build mssql dependencies
|
23
|
+
RUN mvn -f ci/mssql/pom.xml clean install -P binary-packaging \
|
24
|
+
&& cp -rf ci/mssql/target/*.jar ./lib/gooddata/cloud_resources/mssql/drivers/
|
25
|
+
|
26
|
+
# build mysql dependencies
|
27
|
+
RUN mvn -f ci/mysql/pom.xml clean install -P binary-packaging \
|
28
|
+
&& cp -rf ci/mysql/target/*.jar ./lib/gooddata/cloud_resources/mysql/drivers/
|
29
|
+
|
18
30
|
# Import GoodData certificate to Java. This is needed for connection to ADS.
|
19
31
|
# https://jira.intgdc.com/browse/TMA-300
|
20
32
|
RUN keytool -importcert -alias gooddata-2008 -file "./data/2008.crt" -keystore $JAVA_HOME/lib/security/cacerts -trustcacerts -storepass 'changeit' -noprompt
|
data/SDK_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.7.
|
1
|
+
3.7.80
|
data/ci/bigquery/pom.xml
CHANGED
data/ci/postgresql/pom.xml
CHANGED
data/ci/snowflake/pom.xml
CHANGED
data/gooddata.gemspec
CHANGED
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.add_development_dependency 'rspec_junit_formatter', '~> 0.6.0'
|
35
35
|
if RUBY_VERSION >= '2.6'
|
36
36
|
s.add_development_dependency 'rubocop', '>= 1.28'
|
37
|
+
s.add_development_dependency 'rubocop-ast', '>= 1.24.1', '<= 1.42.0'
|
37
38
|
else
|
38
39
|
s.add_development_dependency 'rubocop', '~> 0.81'
|
39
40
|
end
|
@@ -52,12 +53,22 @@ Gem::Specification.new do |s|
|
|
52
53
|
|
53
54
|
s.add_development_dependency 'sqlite3' if RUBY_PLATFORM != 'java'
|
54
55
|
|
55
|
-
if RUBY_VERSION >= '2.
|
56
|
-
|
56
|
+
if RUBY_VERSION >= '2.8'
|
57
|
+
s.add_dependency 'activesupport', '>= 6.0.3.1'
|
58
|
+
elsif RUBY_VERSION >= '2.5'
|
59
|
+
s.add_dependency 'activesupport', '< 7.0.0'
|
57
60
|
else
|
58
61
|
s.add_dependency 'activesupport', '>= 5.2.4.3', '< 6.0'
|
59
62
|
end
|
60
63
|
|
64
|
+
if RUBY_VERSION >= '3.1'
|
65
|
+
# net-smtp, net-imap and net-pop were removed from default gems in Ruby 3.1, but is used by the `mail` gem.
|
66
|
+
# So we need to add them as dependencies until `mail` is fixed
|
67
|
+
s.add_dependency 'net-smtp'
|
68
|
+
s.add_dependency 'net-imap'
|
69
|
+
s.add_dependency 'net-pop'
|
70
|
+
end
|
71
|
+
|
61
72
|
s.add_dependency 'aws-sdk-s3', '~> 1.16'
|
62
73
|
if RUBY_VERSION >= '2.5'
|
63
74
|
s.add_dependency 'docile', '~> 1.1'
|
@@ -67,11 +78,12 @@ if RUBY_VERSION >= '2.5'
|
|
67
78
|
s.add_dependency 'azure-storage-blob', '~> 2.0'
|
68
79
|
s.add_dependency 'nokogiri', '~> 1', '>= 1.10.8'
|
69
80
|
s.add_dependency 'gli', '~> 2.15'
|
70
|
-
s.add_dependency 'gooddata_datawarehouse', '~> 0.0.
|
81
|
+
s.add_dependency 'gooddata_datawarehouse', '~> 0.0.12' if RUBY_PLATFORM == 'java'
|
71
82
|
s.add_dependency 'highline', '= 2.0.0.pre.develop.14'
|
72
83
|
s.add_dependency 'json_pure', '~> 2.6'
|
73
84
|
s.add_dependency 'multi_json', '~> 1.12'
|
74
85
|
s.add_dependency 'parseconfig', '~> 1.0'
|
86
|
+
s.add_dependency 'path_expander', '< 1.1.2'
|
75
87
|
s.add_dependency 'pmap', '~> 1.1'
|
76
88
|
s.add_dependency 'sequel', '< 5.72.0'
|
77
89
|
s.add_dependency 'remote_syslog_logger', '~> 1.0.3'
|
@@ -49,6 +49,7 @@ module GoodData
|
|
49
49
|
raise('Missing connection info for MSSQL client')
|
50
50
|
end
|
51
51
|
|
52
|
+
# When update driver class then also updating driver class using in connection(..) method below
|
52
53
|
Java.com.microsoft.sqlserver.jdbc.SQLServerDriver
|
53
54
|
end
|
54
55
|
|
@@ -90,7 +91,7 @@ module GoodData
|
|
90
91
|
prop.setProperty('userName', authentication['userName'])
|
91
92
|
prop.setProperty('password', authentication['password'])
|
92
93
|
|
93
|
-
@connection =
|
94
|
+
@connection = com.microsoft.sqlserver.jdbc.SQLServerDriver.new.connect(connection_string, prop)
|
94
95
|
end
|
95
96
|
|
96
97
|
def validate
|
@@ -49,6 +49,7 @@ module GoodData
|
|
49
49
|
raise('Missing connection info for Mysql client')
|
50
50
|
end
|
51
51
|
|
52
|
+
# When update driver class then also updating driver class using in connection(..) method below
|
52
53
|
Java.com.mysql.jdbc.Driver
|
53
54
|
end
|
54
55
|
|
@@ -84,7 +85,7 @@ module GoodData
|
|
84
85
|
prop = java.util.Properties.new
|
85
86
|
prop.setProperty('user', @authentication['basic']['userName'])
|
86
87
|
prop.setProperty('password', @authentication['basic']['password'])
|
87
|
-
@connection =
|
88
|
+
@connection = com.mysql.jdbc.Driver.new.connect(@url, prop)
|
88
89
|
@connection.set_auto_commit(false)
|
89
90
|
end
|
90
91
|
|
@@ -49,6 +49,7 @@ module GoodData
|
|
49
49
|
raise('Missing connection info for Postgres client')
|
50
50
|
end
|
51
51
|
|
52
|
+
# When update driver class then also updating driver class using in connection(..) method below
|
52
53
|
Java.org.postgresql.Driver
|
53
54
|
end
|
54
55
|
|
@@ -86,7 +87,7 @@ module GoodData
|
|
86
87
|
prop.setProperty('password', @authentication['basic']['password'])
|
87
88
|
prop.setProperty('schema', @schema)
|
88
89
|
|
89
|
-
@connection =
|
90
|
+
@connection = org.postgresql.Driver.new.connect(@url, prop)
|
90
91
|
statement = @connection.create_statement
|
91
92
|
statement.execute("#{POSTGRES_SET_SCHEMA_COMMAND} #{@schema}")
|
92
93
|
@connection.set_auto_commit(false)
|
@@ -38,6 +38,7 @@ module GoodData
|
|
38
38
|
end
|
39
39
|
@debug = options['debug'] == true || options['debug'] == 'true'
|
40
40
|
|
41
|
+
# When update driver class then also updating driver class using in connection(..) method below
|
41
42
|
Java.com.amazon.redshift.jdbc42.Driver
|
42
43
|
end
|
43
44
|
|
@@ -83,7 +84,7 @@ module GoodData
|
|
83
84
|
prop.setProperty('DbUser', @authentication['iam']['dbUser'])
|
84
85
|
end
|
85
86
|
|
86
|
-
@connection =
|
87
|
+
@connection = com.amazon.redshift.jdbc42.Driver.new.connect(full_url, prop)
|
87
88
|
end
|
88
89
|
|
89
90
|
private
|
@@ -41,6 +41,7 @@ module GoodData
|
|
41
41
|
|
42
42
|
end
|
43
43
|
|
44
|
+
# When update driver class then also updating driver class using in connection(..) method below
|
44
45
|
Java.net.snowflake.client.jdbc.SnowflakeDriver
|
45
46
|
end
|
46
47
|
|
@@ -79,8 +80,10 @@ module GoodData
|
|
79
80
|
prop.setProperty('schema', @schema)
|
80
81
|
prop.setProperty('warehouse', @warehouse)
|
81
82
|
prop.setProperty('db', @database)
|
83
|
+
# Add JDBC_QUERY_RESULT_FORMAT parameter to fix unsafe memory issue of Snowflake JDBC driver
|
84
|
+
prop.setProperty('JDBC_QUERY_RESULT_FORMAT', 'JSON')
|
82
85
|
|
83
|
-
@connection =
|
86
|
+
@connection = com.snowflake.client.jdbc.SnowflakeDriver.new.connect(@url, prop)
|
84
87
|
end
|
85
88
|
|
86
89
|
def build_url(url)
|
@@ -33,7 +33,7 @@ module GoodData
|
|
33
33
|
include Hashie::Extensions::DeepMerge
|
34
34
|
end
|
35
35
|
|
36
|
-
set_const :GD_MAX_RETRY, (ENV['GD_MAX_RETRY'] && ENV['GD_MAX_RETRY'].to_i) ||
|
36
|
+
set_const :GD_MAX_RETRY, (ENV['GD_MAX_RETRY'] && ENV['GD_MAX_RETRY'].to_i) || 14
|
37
37
|
AES_256_CBC_CIPHER = 'aes-256-cbc'
|
38
38
|
|
39
39
|
class << self
|
@@ -20,6 +20,9 @@ module GoodData
|
|
20
20
|
|
21
21
|
description 'Synchronization Info'
|
22
22
|
param :synchronize, array_of(instance_of(Type::SynchronizationInfoType)), required: true, generated: true
|
23
|
+
|
24
|
+
description 'Number Of Threads'
|
25
|
+
param :number_of_threads, instance_of(Type::StringType), required: false, default: '10'
|
23
26
|
end
|
24
27
|
|
25
28
|
class << self
|
@@ -28,15 +31,16 @@ module GoodData
|
|
28
31
|
|
29
32
|
client = params.gdc_gd_client
|
30
33
|
development_client = params.development_client
|
34
|
+
number_of_threads = Integer(params.number_of_threads || '8')
|
31
35
|
|
32
|
-
params.synchronize.peach do |info|
|
36
|
+
params.synchronize.peach(number_of_threads) do |info|
|
33
37
|
from = info.from
|
34
38
|
to_projects = info.to
|
35
39
|
transfer_uris = info.transfer_uris
|
36
40
|
|
37
41
|
from_project = development_client.projects(from) || fail("Invalid 'from' project specified - '#{from}'")
|
38
42
|
|
39
|
-
to_projects.peach do |entry|
|
43
|
+
to_projects.peach(number_of_threads) do |entry|
|
40
44
|
pid = entry[:pid]
|
41
45
|
to_project = client.projects(pid) || fail("Invalid 'to' project specified - '#{pid}'")
|
42
46
|
|
@@ -170,7 +170,27 @@ module GoodData
|
|
170
170
|
|
171
171
|
# Synchronize failure for all clients in segment
|
172
172
|
if continue_on_error && success_count.zero? && failed_count.positive?
|
173
|
-
segment_warning_message = "Failed to synchronize clients for #{segment.segment_id} segment. Details: #{sync_result['links']['details']}"
|
173
|
+
segment_warning_message = "Failed to synchronize all clients for #{segment.segment_id} segment. Details: #{sync_result['links']['details']}"
|
174
|
+
if sync_result['links'] && sync_result['links']['details'] # rubocop:disable Style/SafeNavigation
|
175
|
+
begin
|
176
|
+
client = params.gdc_gd_client
|
177
|
+
response = client.get sync_result['links']['details']
|
178
|
+
error_detail_result = response['synchronizationResultDetails']
|
179
|
+
|
180
|
+
if error_detail_result && error_detail_result['items'] # rubocop:disable Style/SafeNavigation
|
181
|
+
error_count = 1
|
182
|
+
error_detail_result['items'].each do |item|
|
183
|
+
break if error_count > 5
|
184
|
+
|
185
|
+
GoodData.logger.warn(error_message(item, segment))
|
186
|
+
error_count += 1
|
187
|
+
end
|
188
|
+
end
|
189
|
+
rescue StandardError => ex
|
190
|
+
GoodData.logger.warn "Failed to fetch result of synchronize clients. Error: #{ex.message}"
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
174
194
|
add_failed_segment(segment.segment_id, segment_warning_message, short_name, params)
|
175
195
|
return
|
176
196
|
end
|
@@ -192,7 +212,7 @@ module GoodData
|
|
192
212
|
|
193
213
|
def error_message(error_item, segment)
|
194
214
|
error_client_id = error_item['id']
|
195
|
-
error_message = "Failed to synchronize #{error_client_id} client in #{segment.segment_id} segment
|
215
|
+
error_message = "Failed to synchronize #{error_client_id} client in #{segment.segment_id} segment"
|
196
216
|
error_message = "#{error_message}. Detail: #{error_item['error']['message']}" if error_item['error'] && error_item['error']['message']
|
197
217
|
|
198
218
|
error_message = "#{error_message}. Error items: #{error_item['error']['parameters']}" if error_item['error'] && error_item['error']['parameters']
|