From 1d0768ceed60c0dad6e6ad10f29da70bf06fcaf0 Mon Sep 17 00:00:00 2001 From: Guilherme Santos Date: Fri, 30 Jan 2026 14:09:43 +0100 Subject: [PATCH 1/2] Implementation of github actions for lcm-integration-e2e --- .github/workflows/check.yaml | 18 +++++- .github/workflows/lcm-integration-e2e.yaml | 75 ++++++++++++++++++++++ lib/gooddata/rest/connection.rb | 2 +- 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lcm-integration-e2e.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 6ee3c1237..de2d8dd61 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -23,9 +23,25 @@ jobs: id: changed-files uses: tj-actions/changed-files@v45 - gooddata-ruby-lcm-build-pipeline: + gooddata-ruby-lcm-integration-e2e: needs: - prepare-env + uses: ./.github/workflows/lcm-integration-e2e.yaml + secrets: inherit + permissions: + id-token: write + contents: read + if: ${{ needs.prepare-env.outputs.branch == 'master' }} + with: + AUTO_MERGE: false + base_branch: ${{ needs.prepare-env.outputs.branch }} + deploy: false + pr_number: ${{ needs.prepare-env.outputs.pr_number }} + java_version: '11' + + gooddata-ruby-lcm-build-pipeline: + needs: + - gooddata-ruby-lcm-integration-e2e permissions: contents: read id-token: write diff --git a/.github/workflows/lcm-integration-e2e.yaml b/.github/workflows/lcm-integration-e2e.yaml new file mode 100644 index 000000000..df6adb8a2 --- /dev/null +++ b/.github/workflows/lcm-integration-e2e.yaml @@ -0,0 +1,75 @@ +name: LCM Integration E2E Pipeline + +on: + workflow_call: + inputs: + AUTO_MERGE: + default: true + required: false + type: boolean + description: Must be set here in order to use in if condition at job level. + base_branch: + required: true + type: string + description: The base branch to compare against for detecting changes. + pr_number: + required: true + type: string + +env: + RT_S3_BUCKET_NAME: "gdc-dev-eu-integration-tests" + JAVA_HOME: /usr/lib/jvm/java-${{ inputs.java-version }}-openjdk-amd64 + PATH: /usr/lib/jvm/java-${{ inputs.java-version }}-openjdk-amd64/bin:/usr/local/bin:/usr/bin:/bin + +jobs: + LCM-integration-e2e-tests: + runs-on: + group: infra1-runners-arc + labels: runners-rxa-xlarge + permissions: + id-token: write + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: 'true' + token: ${{ secrets.TOKEN_GITHUB_YENKINS }} + - name: Set up JRuby + Bundler + uses: ruby/setup-ruby@v1 + with: + ruby-version: 'jruby-9.4.12.1' + bundler-cache: true + - name: Build image + run: | + bundle exec rake -f lcm.rake docker:build + - name: Build gems + run: | + bundle exec rake -f lcm.rake docker:bundle + - name: Run integrated tests + run: | + bundle exec rake -f lcm.rake test:docker:integration-e2e + env: + GD_SPEC_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + RT_S3_BUCKET_NAME: ${{ env.RT_S3_BUCKET_NAME }} + RT_S3_ACCESS_KEY: ${{ secrets.RUBY_TEST_S3_ACCESS_KEY }} + RT_S3_SECRET_KEY: ${{ secrets.RUBY_TEST_S3_SECRET_KEY }} + GD_DEV_DEV_TOKEN: ${{ secrets.RUBY_TEST_DEV_TOKEN }} + GD_DEV_PROD_TOKEN: ${{ secrets.RUBY_TEST_PROD_TOKEN }} + GD_DEV_VERTICA_DEV_TOKEN: ${{ secrets.RUBY_TEST_DEV_TOKEN_VERTICA }} + GD_DEV_VERTICA_PROD_TOKEN: ${{ secrets.RUBY_TEST_PROD_TOKEN_VERTICA }} + GD_DEV_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + GD_DEV_DEFAULT_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + GD_TEST_DEV_TOKEN: ${{ secrets.RUBY_TEST_DEV_TOKEN }} + GD_TEST_PROD_TOKEN: ${{ secrets.RUBY_TEST_PROD_TOKEN }} + GD_TEST_VERTICA_DEV_TOKEN: ${{ secrets.RUBY_TEST_DEV_TOKEN_VERTICA }} + GD_TEST_VERTICA_PROD_TOKEN: ${{ secrets.RUBY_TEST_PROD_TOKEN_VERTICA }} + GD_TEST_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + GD_TEST_DEFAULT_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + GD_STG_DEV_TOKEN: ${{ secrets.RUBY_TEST_DEV_TOKEN }} + GD_STG_PROD_TOKEN: ${{ secrets.RUBY_TEST_PROD_TOKEN }} + GD_STG_VERTICA_DEV_TOKEN: ${{ secrets.RUBY_TEST_DEV_TOKEN_VERTICA }} + GD_STG_VERTICA_PROD_TOKEN: ${{ secrets.RUBY_TEST_PROD_TOKEN_VERTICA }} + GD_STG_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + GD_STG_DEFAULT_PASSWORD: ${{ secrets.RUBY_TEST_PASSWORD }} + diff --git a/lib/gooddata/rest/connection.rb b/lib/gooddata/rest/connection.rb index dcf7df577..4f842ee33 100644 --- a/lib/gooddata/rest/connection.rb +++ b/lib/gooddata/rest/connection.rb @@ -178,7 +178,7 @@ def initialize(opts) # Connect using username and password def connect(username, password, options = {}) if RUBY_VERSION >= '3.3' - Psych::Parser.code_point_limit = 100_000_000 + Psych::Parser.code_point_limit = 100_000_000_000 end server = options[:server] || Helpers::AuthHelper.read_server options = DEFAULT_LOGIN_PAYLOAD.merge(options) From fd7b907228b5dd2f5520a6eb63a91f98a52d5e1a Mon Sep 17 00:00:00 2001 From: Guilherme Santos Date: Mon, 2 Mar 2026 14:24:21 +0100 Subject: [PATCH 2/2] fix code_point_limit for current ruby version --- .github/workflows/check.yaml | 1 + .github/workflows/lcm-integration-e2e.yaml | 12 +++++++++--- lib/gooddata/rest/connection.rb | 6 ++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index de2d8dd61..8ef47db86 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -38,6 +38,7 @@ jobs: deploy: false pr_number: ${{ needs.prepare-env.outputs.pr_number }} java_version: '11' + ruby_version: 'jruby-9.4.12.1' gooddata-ruby-lcm-build-pipeline: needs: diff --git a/.github/workflows/lcm-integration-e2e.yaml b/.github/workflows/lcm-integration-e2e.yaml index df6adb8a2..3366ac191 100644 --- a/.github/workflows/lcm-integration-e2e.yaml +++ b/.github/workflows/lcm-integration-e2e.yaml @@ -15,11 +15,17 @@ on: pr_number: required: true type: string + java_version: + required: true + type: string + ruby_version: + required: true + type: string env: RT_S3_BUCKET_NAME: "gdc-dev-eu-integration-tests" - JAVA_HOME: /usr/lib/jvm/java-${{ inputs.java-version }}-openjdk-amd64 - PATH: /usr/lib/jvm/java-${{ inputs.java-version }}-openjdk-amd64/bin:/usr/local/bin:/usr/bin:/bin + JAVA_HOME: /usr/lib/jvm/java-${{ inputs.java_version }}-openjdk-amd64 + PATH: /usr/lib/jvm/java-${{ inputs.java_version }}-openjdk-amd64/bin:/usr/local/bin:/usr/bin:/bin jobs: LCM-integration-e2e-tests: @@ -38,7 +44,7 @@ jobs: - name: Set up JRuby + Bundler uses: ruby/setup-ruby@v1 with: - ruby-version: 'jruby-9.4.12.1' + ruby-version: ${{ inputs.ruby_version }} bundler-cache: true - name: Build image run: | diff --git a/lib/gooddata/rest/connection.rb b/lib/gooddata/rest/connection.rb index 4f842ee33..10a9e6e85 100644 --- a/lib/gooddata/rest/connection.rb +++ b/lib/gooddata/rest/connection.rb @@ -33,6 +33,8 @@ class Connection TOKEN_PATH = '/gdc/account/token' KEYS_TO_SCRUB = [:password, :verifyPassword, :authorizationToken] API_LEVEL = 2 + KB = 1024 + MB = 1024 * KB ID_LENGTH = 16 @@ -177,8 +179,8 @@ def initialize(opts) # Connect using username and password def connect(username, password, options = {}) - if RUBY_VERSION >= '3.3' - Psych::Parser.code_point_limit = 100_000_000_000 + if RUBY_ENGINE == "jruby" && RUBY_ENGINE_VERSION >= '9.4.12.0' + Psych::Parser.code_point_limit = 100 * MB end server = options[:server] || Helpers::AuthHelper.read_server options = DEFAULT_LOGIN_PAYLOAD.merge(options)