Skip to content

Commit d9eea6a

Browse files
committed
fix code_point_limit for current ruby version, fix failed tests
1 parent 1d0768c commit d9eea6a

6 files changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ jobs:
3535
with:
3636
AUTO_MERGE: false
3737
base_branch: ${{ needs.prepare-env.outputs.branch }}
38-
deploy: false
3938
pr_number: ${{ needs.prepare-env.outputs.pr_number }}
4039
java_version: '11'
40+
ruby_version: 'jruby-9.4.12.1'
4141

4242
gooddata-ruby-lcm-build-pipeline:
4343
needs:

.github/workflows/lcm-integration-e2e.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ on:
1515
pr_number:
1616
required: true
1717
type: string
18+
java_version:
19+
required: true
20+
type: string
21+
ruby_version:
22+
required: true
23+
type: string
1824

1925
env:
2026
RT_S3_BUCKET_NAME: "gdc-dev-eu-integration-tests"
21-
JAVA_HOME: /usr/lib/jvm/java-${{ inputs.java-version }}-openjdk-amd64
22-
PATH: /usr/lib/jvm/java-${{ inputs.java-version }}-openjdk-amd64/bin:/usr/local/bin:/usr/bin:/bin
27+
JAVA_HOME: /usr/lib/jvm/java-${{ inputs.java_version }}-openjdk-amd64
28+
PATH: /usr/lib/jvm/java-${{ inputs.java_version }}-openjdk-amd64/bin:/usr/local/bin:/usr/bin:/bin
2329

2430
jobs:
2531
LCM-integration-e2e-tests:
@@ -38,7 +44,7 @@ jobs:
3844
- name: Set up JRuby + Bundler
3945
uses: ruby/setup-ruby@v1
4046
with:
41-
ruby-version: 'jruby-9.4.12.1'
47+
ruby-version: ${{ inputs.ruby_version }}
4248
bundler-cache: true
4349
- name: Build image
4450
run: |

lib/gooddata/rest/connection.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Connection
3333
TOKEN_PATH = '/gdc/account/token'
3434
KEYS_TO_SCRUB = [:password, :verifyPassword, :authorizationToken]
3535
API_LEVEL = 2
36+
KB = 1024
37+
MB = 1024 * KB
3638

3739
ID_LENGTH = 16
3840

@@ -177,8 +179,8 @@ def initialize(opts)
177179

178180
# Connect using username and password
179181
def connect(username, password, options = {})
180-
if RUBY_VERSION >= '3.3'
181-
Psych::Parser.code_point_limit = 100_000_000_000
182+
if RUBY_ENGINE == "jruby" && RUBY_ENGINE_VERSION >= '9.4.12.0'
183+
Psych::Parser.code_point_limit = 100 * MB
182184
end
183185
server = options[:server] || Helpers::AuthHelper.read_server
184186
options = DEFAULT_LOGIN_PAYLOAD.merge(options)

spec/helpers/constants.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module Helpers
2121
CUSTOM_CLIENT_ID_COLUMN = 'custom_client_id_column'
2222
COMPUTED_ATTRIBUTE_ID = 'attr.comp.my_computed_attr'
2323
USER_GROUP_NAME = 'My Test Group'
24+
ADD_COMPONENT_NAME = 'Automated Data Distribution'
2425
ADD_V2_COMPONENT_NAME = 'lcm-end-to-end-add-component'
2526
ADD_COMPONENT_SCHEDULE_NAME = 'add-component-schedule'
2627
end

spec/lcm/integration/spec/shared_contexts_for_lcm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def create_workspace_csv(workspaces, client_id_column)
253253

254254
begin
255255
GoodData.logger.info("Deleting segments")
256-
domain = @rest_client.domain(@config[:prod_organization])
256+
domain = @prod_rest_client.domain(@config[:prod_organization])
257257
data_product = domain.data_products(@test_context[:data_product])
258258
data_product.delete(force: true)
259259
rescue StandardError => e

spec/lcm/integration/spec/shared_examples_for_synchronization_bricks.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
original_processes.reject! { |p| p.name == ADD_V2_COMPONENT_NAME }
2020
projects.each do |target_project|
2121
target_processes = target_project.processes.to_a
22+
target_processes.reject! { |p| p.name == ADD_COMPONENT_NAME }
2223
expect(target_processes.length).to be original_processes.length
2324
original_processes.each do |expected|
2425
actual = target_processes.find { |p| p.name == expected.name }

0 commit comments

Comments
 (0)