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 code improvements #123

Merged
merged 1 commit into from
Mar 5, 2020
Merged

Conversation

rsevilla87
Copy link
Member

@rsevilla87 rsevilla87 commented Jan 16, 2020

This PR aims to improve ci code with things such as simplify some operatives and use more reliable methods to look for available ci scripts.
Helps on #111

@rht-perf-ci
Copy link

Can one of the admins verify this patch?

@rsevilla87 rsevilla87 requested review from aakarshg and bengland2 and removed request for dry923 January 28, 2020 08:40
ci/run_ci.sh Outdated
echo "Running full test"
test_list=`ls -d */ | grep -Ev "(utils|ci|ripsaw|image_resources)/"`
test_list=`find * -name ci_test.sh -type f -exec dirname {} \;`
Copy link
Contributor

Choose a reason for hiding this comment

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

would -maxdepth 1 be appropriate here because the ci_test.sh has to appear in the top wrapper directory? just being paranoid, but that matches what ls -d */ does more closely. But overall this is an improvement, gets rid of grep -v.

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding -maxdepth flag... Thanks for the suggestion!

ci/run_ci.sh Outdated
else
echo "Running specific tests"
echo $diff_list
test_list=`echo $diff_list | awk -F "/" '{print $1}' | uniq`
test_list=`echo "${diff_list}" | xargs dirname | uniq`
Copy link
Contributor

Choose a reason for hiding this comment

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

call me paranoid, but if someone creates a wrapper with subdirectories, would this work? I think the awk command would. I don't think any existing wrappers have subdirectories, but that could change, there is nothing requiring a wrapper not to use subdirectories. I don't think this is an essential change, do you?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, this change is not essential. It is just an attempt to get the rid of awk here, which sometimes can be confusing, as this command is not focused on path parsing but in strings processing. You're also right in the fact that we're not currently using sub-directories, dirname might be problematic here.

test_rc=1
fi
wait_clean
for dir in ${test_list}; do
Copy link
Contributor

Choose a reason for hiding this comment

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

so if I understand this correctly, we got rid of the -f $my_dir/ci_test.sh because the test_list was constructed to have only directories containing a ci_test.sh. The only other change I see here is ${dir::-1} to ${dir}, which makes sense because if "dir" is an empty string or undefined then how did it get into test_list? it's hard to see if there are other changes here because of the indentation change, but I think that's all, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is exactly what I wanted to do.

Copy link
Contributor

@bengland2 bengland2 left a comment

Choose a reason for hiding this comment

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

overall good cleanups that make it more maintainable, just a couple of minor changes requested. Because it's core code for the CI, am being very picky. HTH -ben

@rsevilla87 rsevilla87 force-pushed the ci-cleanup branch 2 times, most recently from b9a3d49 to 7c8021b Compare January 28, 2020 12:18
@bengland2
Copy link
Contributor

LGTM now -ben

@dry923 dry923 added the ok to test Kick off our CI framework label Jan 28, 2020
@dry923
Copy link
Member

dry923 commented Jan 28, 2020

/rerun all

@rht-perf-ci
Copy link

Results for SNAFU CI Test

Test Result Runtime
fio_wrapper FAIL 00:22:13
fs_drift_wrapper PASS 00:09:03
hammerdb PASS 00:17:29
iperf FAIL 00:03:01
pgbench-wrapper PASS 00:22:08
smallfile_wrapper FAIL 00:09:35
sysbench FAIL 00:05:47
uperf-wrapper PASS 00:09:41
ycsb-wrapper PASS 00:28:56

@dry923
Copy link
Member

dry923 commented Jan 28, 2020

@rsevilla87 FYI theres a conflict in ci/common.sh

@bengland2
Copy link
Contributor

I don't understand output of snafu_linters CI job. It seems not to have run at all, did it?

> git rev-parse origin-pull/pull/130/merge^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

@aakarshg

@dry923
Copy link
Member

dry923 commented Feb 13, 2020

I don't understand output of snafu_linters CI job. It seems not to have run at all, did it?

> git rev-parse origin-pull/pull/130/merge^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

@aakarshg

@aakarshg hey any idea on ^

@aakarshg
Copy link
Contributor

I don't understand output of snafu_linters CI job. It seems not to have run at all, did it?

> git rev-parse origin-pull/pull/130/merge^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

@aakarshg

@aakarshg hey any idea on ^

this was when we're testing the job. It'll run fine now if we hit the rerun

@aakarshg aakarshg requested a review from dry923 February 20, 2020 15:45
@aakarshg
Copy link
Contributor

aakarshg commented Mar 3, 2020

/rerun all

@rht-perf-ci
Copy link

Results for SNAFU CI Test

Test Result Runtime
fio_wrapper FAIL 00:05:10
fs_drift_wrapper FAIL 00:04:30
hammerdb FAIL 00:05:19
iperf FAIL 00:02:53
pgbench-wrapper FAIL 00:04:40
smallfile_wrapper FAIL 00:04:30
sysbench FAIL 00:03:01
uperf-wrapper FAIL 00:04:26
ycsb-wrapper FAIL 00:10:31

@rsevilla87 rsevilla87 force-pushed the ci-cleanup branch 3 times, most recently from 8113c92 to f37d420 Compare March 3, 2020 18:39
@rht-perf-ci
Copy link

Results for SNAFU CI Test

Test Result Runtime
fio_wrapper PASS 00:13:04
fs_drift_wrapper PASS 00:10:59
hammerdb PASS 00:10:03
iperf PASS 00:06:34
pgbench-wrapper PASS 00:07:48
smallfile_wrapper PASS 00:12:09
sysbench PASS 00:05:37
uperf-wrapper FAIL 00:10:24
ycsb-wrapper FAIL 00:05:45

@rsevilla87
Copy link
Member Author

/rerun all

@rht-perf-ci
Copy link

Results for SNAFU CI Test

Test Result Runtime
fio_wrapper PASS 00:13:50
fs_drift_wrapper PASS 00:11:04
hammerdb PASS 00:10:10
iperf PASS 00:06:24
pgbench-wrapper PASS 00:07:38
smallfile_wrapper PASS 00:12:17
sysbench PASS 00:05:36
uperf-wrapper PASS 00:10:33
ycsb-wrapper PASS 00:12:14

Copy link
Member

@dry923 dry923 left a comment

Choose a reason for hiding this comment

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

LGTM!

@aakarshg aakarshg requested a review from bengland2 March 5, 2020 19:24
Copy link
Contributor

@aakarshg aakarshg left a comment

Choose a reason for hiding this comment

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

LGTM, will merge once @bengland2 also signs off, as he'd a few comments on some parts of the PR

Copy link
Contributor

@bengland2 bengland2 left a comment

Choose a reason for hiding this comment

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

sorry, thought I already approved this. Anyway, it is good cleanup work that will make it more maintainable. I already commented on it to Raul and in here.

@aakarshg aakarshg merged commit 65c73ff into cloud-bulldozer:master Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok to test Kick off our CI framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants