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

Add scheduled dispatch workflows for test suites #1521

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Polber
Copy link
Contributor

@Polber Polber commented May 6, 2024

PR adds various workflows to be able to run individual test suite(s) against a branch, as well as run all the workflows on a 6 hour interval for observability.

This PR does not affect existing workflows - it only adds new ones.

@Polber Polber requested review from Abacn and damccorm May 6, 2024 16:58
@Polber Polber self-assigned this May 6, 2024
@Polber Polber force-pushed the jkinard/add-dispatch-workflows branch from 7911b5d to 5000882 Compare May 6, 2024 17:00
@pull-request-size pull-request-size bot added size/XL and removed size/L labels May 6, 2024
@Polber Polber force-pushed the jkinard/add-dispatch-workflows branch from 5000882 to c9fce62 Compare May 6, 2024 17:10
Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
@Polber Polber force-pushed the jkinard/add-dispatch-workflows branch from c9fce62 to 47cece6 Compare May 6, 2024 17:10
This was referenced May 6, 2024
Comment on lines +32 to +38
- name: Setup Environment
id: setup-env
uses: ./.github/actions/setup-env

- name: Run Build
shell: bash
run: ./cicd/run-build --changed-files="${{ inputs.changed-files }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this just shell out to the run-build action?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same question applies elsewhere

with:
ref: ${{ inputs.branch }}
fetch-depth: 2 # setup-env action assumes fetch depth of at least 2 for https://github.com/tj-actions/changed-files?tab=readme-ov-file#on-push-%EF%B8%8F
- name: Run Java Build
Copy link
Contributor

Choose a reason for hiding this comment

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

Having a build workflow seems less useful since this will be done by all the other workflows


# Checks that are intended to run on PRs containing Java code.

name: Java Integration Tests
Copy link
Contributor

Choose a reason for hiding this comment

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

Taking a step back, what is your goal with these workflows? The Java PR workflow already can be run manually, why is having separate workflows better?

It seems like maybe the goal is to have a more granular signal? Or to allow individual pieces to be run independently of the main workflow?

I think there might be better ways to accomplish this - having 2 workflow files that do more or less the same thing is somewhat of an antipattern (and is just expensive). Rather than doing this, maybe we can restructure the existing java pr workflow to have some conditional logic. For example:

  1. Always run everything on schedule
  2. Run everything after build in parallel instead of serially
  3. Insert if conditions on the job that are basically like: if: not is(workflow_dispatch) || input.run_its (similar to https://github.com/apache/beam/blob/ea3c2a4dbbe20a8e7161d362102bb1753bd60bba/.github/workflows/build_release_candidate.yml#L25)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm generally supportive of moving things to composite actions where helpful, but I don't like doubling our workflow count, especially since we'd now need to do more work to keep different workflows in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants