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

CI - Minimal and full CI matrix impl #2051

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

avifenesh
Copy link
Collaborator

@avifenesh avifenesh commented Jul 30, 2024

Limited the CI to run on PR and PUSH to run just on Ubuntu-latest and latest and last version supported for engine and language version.
Added Schedule run daily, one hour in between each workflow, start from 3 AM, GMT+3.
Updated with all Node.js versions supported.
Added DEVELOPER.md with some info in it, will need to be wider, but it will be part of separate task.
Dispatch accept input for running full matrix (bool).

Labels can't be tested before merged to main as well as schedule, so test will happen live, since it will run or not, and has no optional bad outcomes it is okay.

In this PR changes worked as expected.

@avifenesh avifenesh requested a review from a team as a code owner July 30, 2024 10:34
@avifenesh avifenesh added enhancement New feature or request python node java issues and fixes related to the java client CI CI/CD related docs Documentation testing Platforms Platforms matter labels Jul 30, 2024
@avifenesh avifenesh added this to the node-GA milestone Jul 30, 2024
@avifenesh avifenesh linked an issue Jul 30, 2024 that may be closed by this pull request
@avifenesh avifenesh added Core changes Used to label a PR as PR with significant changes that should trigger a full matrix tests. CI CI/CD related docs Documentation testing and removed enhancement New feature or request python node java issues and fixes related to the java client CI CI/CD related docs Documentation testing Platforms Platforms matter Core changes Used to label a PR as PR with significant changes that should trigger a full matrix tests. labels Jul 30, 2024
@avifenesh avifenesh requested a review from barshaul July 30, 2024 11:38
avifenesh and others added 4 commits August 30, 2024 19:39
Signed-off-by: avifenesh <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Copy link
Collaborator Author

@avifenesh avifenesh left a comment

Choose a reason for hiding this comment

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

All over all great job, added many comments to make it perfect but great job, much appreciated

`Build matrix`
`Shared dependencies installation`
`Linting (Rust)`

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After the first healthy run, full and minimal, we can add.

"type": "valkey",
"version": "8.0.0-rc1"
}
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good initiative with 8,
@barshaul about minors, how do we choose which to run? There's 7.2.4/5/6 for ValKey, base on what we're taking one over the other?

@@ -0,0 +1,27 @@
[
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did it myself in your recommendation, but why we run just one when there's less option? I think it's not the amount available, it's about testing the supported range with the highest and lowest, so if we support just two version this is our range, and we test all of it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same for go and C# altho maybe C# is not under current development, so there's no need, we just want to keep it kind of under control.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree.
C# CI can be kept there, it is not triggered unless we change something in common CI files or in GLIDE core.
BTW, we can deactivate C# CI at all:
{1E46BB37-51D0-4332-8242-D4E19871057A}

"always-run-versions": ["8.0"]
},
{
"language": "go",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why does are the chosen versions?
@MikeMwita can you give your opinion about the Go versions that should be tested? Does some have significant differences?

Copy link
Collaborator

Choose a reason for hiding this comment

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

version 1.22.0 is okay

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copied from go CI. Proposals are welcome.
BTW I need to test empty version array (e.g. empty matrix)

@@ -0,0 +1,17 @@
[
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why both files?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh thanks, I missed to delete that on.

on:
workflow_dispatch: # note: if started manually, it won't run all matrix
schedule:
- cron: "0 3 * * *" # Runs at 03:00 (3 AM) UTC every day
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it good time for you guys as well? We should try to make it as less hurting as possible, for us if everything ends by 7 AM we are good. Let's calculate from there backwards.

Copy link
Collaborator

Choose a reason for hiding this comment

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

UTC Midnight occurs during our workday. This job will completely destroy the CI queue by adding ~200 jobs.
https://github.com/Yury-Fridlyand/valkey-glide/actions/runs/10641495001

  • There are 120 jobs for python (60 + 60, because PubSub IT are in separate job)
  • 24 for java (will be 48 once I split pubsub too)
  • 24 for C# (could be deactivated)
  • 12 for go
  • 100 for node
  • 20 for glide core lib

I don't know how much time this might take. It depends on number of runners available on valkey org and on number of other nightly jobs (valkey repo has also nightly CI jobs)

name: Nightly tests

on:
workflow_dispatch: # note: if started manually, it won't run all matrix
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can we add the option to choose full or not?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It did not work for me. I'll try to fix it and restore.

- cron: "0 3 * * *" # Runs at 03:00 (3 AM) UTC every day

concurrency:
group: nightly-${{ github.head_ref || github.ref }}-${{ inputs }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is the meaning of inputs here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, I need to restore input or remove it from there.
The goal was to distiguish the full and partial jobs.

@@ -128,52 +143,8 @@ jobs:
cargo-toml-folder: ./node/rust-client
name: lint node rust

# build-macos-latest:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep

@@ -141,57 +146,41 @@ jobs:
utils/clusters/**
benchmarks/results/**

test-pubsub:
test-pubsub-python:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not part of the scope of the PR, but can you add a comment that we run it separately because python testing cant handle the load?


TODO: Add a description of the CI/CD workflow and its components.

### Overview
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file need to be edited for fitting the last changes with scheduling.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe we should add a short component on the specific schedule WF

Copy link
Collaborator

Choose a reason for hiding this comment

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

Updating the doc is still in TODO. But I don't want this file to delay the PR, so we can update it later in a separate PR.
I also want to include some debugging hints there.


Modify `<language>.yml` files to adjust language-specific steps.
Update matrix files to change tested versions or environments.
Adjust cron schedules in workflow files for different timing of scheduled runs.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for example here

@avifenesh avifenesh added Release blocker OPS and removed CI CI/CD related docs Documentation testing Core changes Used to label a PR as PR with significant changes that should trigger a full matrix tests. labels Sep 2, 2024
@avifenesh avifenesh assigned Yury-Fridlyand and unassigned avifenesh Sep 2, 2024
@ikolomi ikolomi modified the milestones: 1.1, 1.2 Sep 15, 2024
@Yury-Fridlyand Yury-Fridlyand linked an issue Sep 19, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Test different npm versions Align redis installation in CI for all OS and runners
5 participants