diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 6ee3c1237..8ef47db86 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -23,9 +23,26 @@ 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' + ruby_version: 'jruby-9.4.12.1' + + 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..3366ac191 --- /dev/null +++ b/.github/workflows/lcm-integration-e2e.yaml @@ -0,0 +1,81 @@ +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 + 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 + +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: ${{ inputs.ruby_version }} + 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..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 + 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)