Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beam post commit java influx db io it #28530

Merged
merged 7 commits into from
Sep 29, 2023

Conversation

volatilemolotov
Copy link
Contributor

Migrate beam_PostCommit_Java_InfluxDbIO_IT

Also adds an action for setting up access for k8s cluster.
Uses pyTooling/Actions/with-post-step@v0.4.6 in order to cleanup the created namespace when the job is finished or failed. Think it will need approval


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions bot added the build label Sep 19, 2023
@github-actions
Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @Abacn for label build.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@volatilemolotov
Copy link
Contributor Author

@damccorm @Abacn I forgot to put it into draft so a reviewer got assigned. Think its good to go but i just wanted to check with you on the added action for post execution. This action if approved would also be used to update check status (re: comment trigger added checks to PR)

@damccorm
Copy link
Contributor

Oh neat, I think that's a good addition. If infra doesn't like it, we could also always write our own (its not much code - https://github.com/pyTooling/Actions/blob/main/with-post-step/main.js)

@Abacn would you mind following up with infra to request this one?

Copy link
Collaborator

@andreydevyatkin andreydevyatkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the inline comments

beam_PostCommit_Java_InfluxDbIO_IT:
name: ${{matrix.job_name}} (${{matrix.job_phrase}})
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 120
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is no explicitly specified job timeout, it should be 100 by default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 120
strategy:
fail-fast: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is redundant since there are no other jobs to run

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

job_name: [beam_PostCommit_Java_InfluxDbIO_IT]
job_phrase: [Run Java InfluxDbIO_IT]
if: |
github.event_name == 'push' ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed, since there is no push event listed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

uses: ./.github/actions/setup-k8s-access
with:
cluster_name: io-datastores
k8s_namespace: workflow-${{ github.run_id }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to include the job name:

k8s_namespace: ${{ matrix.job_name }}-${{ github.run_id }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added and supported in k8s action

- name: Install InfluxDB
id: install_influxdb
run: |
kubectl apply -f .test-infra/kubernetes/influxdb/influxdb.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify the absolute path?
${{ github.workspace }}/.test-infra/kubernetes/influxdb/influxdb.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:java:io:influxdb:integrationTest --tests org.apache.beam.sdk.io.influxdb.InfluxDbIOIT
arguments: -DintegrationTestRunner=direct -DintegrationTestPipelineOptions='["--influxDBURL=http://${{ steps.install_influxdb.outputs.influxdb_IP }}:8086","--influxDBUserName=superadmin","--influxDBPassword=supersecretpassword","--databaseName=db1"]'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that this is really necessary, but there is a --info switch that is being used by Jenkins

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Collaborator

@andreydevyatkin andreydevyatkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Abacn
Copy link
Contributor

Abacn commented Sep 25, 2023

Oh neat, I think that's a good addition. If infra doesn't like it, we could also always write our own (its not much code - https://github.com/pyTooling/Actions/blob/main/with-post-step/main.js)

@Abacn would you mind following up with infra to request this one?

Sorry for missed the comment. Opened https://issues.apache.org/jira/browse/INFRA-25021

@volatilemolotov
Copy link
Contributor Author

@damccorm this one is ok now since the action got approved so please take a final look

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@damccorm damccorm merged commit 65de726 into apache:master Sep 29, 2023
4 checks passed
@volatilemolotov volatilemolotov deleted the beam_PostCommit_Java_InfluxDbIO_IT branch September 29, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants