Skip to content

Conversation

@adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Nov 27, 2022

What changes were proposed in this pull request?

build-branch workflow is disabled by default in new contributors' forks because it has a scheduled run. We may be able to improve new contributor experience by separating scheduled runs from regular CI workflow.

This is achieved by moving the workflow steps into ci.yml, which is defined as a reusable workflow. It is called by existing build-branch workflow (post-commit.yml) on push/pull_request events, and by new scheduled_ci.yml on schedule.

It also saves resources, because the scheduled run can be kept disabled in forks.

https://issues.apache.org/jira/browse/HDDS-7540

How was this patch tested?

https://github.com/adoroszlai/hadoop-ozone/actions/runs/3543655506

@adoroszlai adoroszlai self-assigned this Nov 27, 2022
name: scheduled-ci
on:
schedule:
- cron: 30 0,12 * * *
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this run for every fork? We should document the side effects of forking on CI runs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It only runs if the workflow is enabled. That's one of the reasons to separate the scheduled workflow, so that it can be kept disabled in forks, but still have regular CI on push.

Copy link
Contributor

Choose a reason for hiding this comment

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

separate the scheduled workflow, so that it can be kept disabled in forks

The schedule-ci is active and triggered with the schedule event that occurs every 12 hours, right? How are we going to disable it (the workflow) for the new contributor forks?

@kerneltime kerneltime requested a review from neils-dev November 28, 2022 17:50
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @adoroszlai for simplifying the workflows and making the build-branch workflow avail to new contributors with this patch.
With this change, we should also update the Ozone CI with Githubs Actions md documentation file, https://github.com/adoroszlai/hadoop-ozone/blob/09dfaffbd86a3adcd49402b61a251c98412c509e/.github/ci.md?plain=1#L1, to note the the build-branch jobs are in the new ci.yml file that is triggered on pull through the post-commit.yml. Perhaps also noting the scheduling can be enabled / disabled on forks to run twice a day, (00:30 and 12:30) and updating that the scheduling is done through the new scheduled ci.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.

Thanks for the reminder @neils-dev, updating the doc is a good suggestion. I'll do this in a follow-up PR, because the separate doc change will require fewer checks, rather than repeating the full CI required for this change.

name: scheduled-ci
on:
schedule:
- cron: 30 0,12 * * *
Copy link
Contributor

Choose a reason for hiding this comment

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

separate the scheduled workflow, so that it can be kept disabled in forks

The schedule-ci is active and triggered with the schedule event that occurs every 12 hours, right? How are we going to disable it (the workflow) for the new contributor forks?

@adoroszlai adoroszlai merged commit f552cf2 into apache:master Nov 29, 2022
@adoroszlai adoroszlai deleted the HDDS-7540 branch November 29, 2022 08:55
@adoroszlai
Copy link
Contributor Author

Thanks @kerneltime, @neils-dev for the review.

Galsza pushed a commit to Galsza/ozone that referenced this pull request Dec 7, 2022
errose28 added a commit to errose28/ozone that referenced this pull request Dec 12, 2022
* master: (110 commits)
  HDDS-7472. EC: Fix NSSummaryEndpoint#getDiskUsage for EC keys (apache#3987)
  HDDS-5704. Ozone URI syntax description in help content needs to mention about ozone service id (apache#3862)
  HDDS-7555. Upgrade Ratis to 2.4.2-8b8bdda-SNAPSHOT. (apache#4028)
  HDDS-7541. FSO recursive delete directory with hierarchy takes much time for cleanup (apache#4008)
  HDDS-7581. Fix update-jar-report for snapshot (apache#4034)
  HDDS-7253. Fix exception when '/' in key name (apache#4038)
  HDDS-7579. Use Netty 4.1.77 for consistency (apache#4031)
  HDDS-7562. Suppress warning about long filenames in tar (apache#4017)
  HDDS-7563. Add a handler for under replicated Ratis containers in RM (apache#4025)
  HDDS-7497. Fix mkdir does not update bucket's usedNamespace (apache#3969)
  HDDS-7567. Invalid entries in LICENSE (apache#4020)
  HDDS-7575. Correct showing of RATIS-THREE icon in Recon UI (apache#4026)
  HDDS-7540. Let reusable workflow inherit secrets (apache#4012)
  HDDS-7568. Bump copyright year in NOTICE (apache#4018)
  HDDS-7394. OM RPC FairCallQueue decay decision metrics list caller username in the metric (apache#3878)
  HDDS-7510. Recon: Return number of open containers in `/clusterState` endpoint (apache#3989)
  HDDS-7561. Improve setquota, clrquota CLI usage (apache#4016)
  HDDS-6615. EC: Improve write performance by pipelining encode and flush (apache#3994)
  HDDS-7554. Recon UI should show DORMANT in pipeline status filter (apache#4010)
  HDDS-7540. Separate scheduled CI from push/PR workflows (apache#4004)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants