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 benchmarker running on Github Actions #612

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Sep 21, 2022

@alxndrsn alxndrsn changed the title Benchmarker GitHub actions master Add benchmarker running on Github Actions Sep 21, 2022
@alxndrsn alxndrsn force-pushed the benchmarker-github-actions-master branch 5 times, most recently from 6a23c82 to 334be49 Compare September 22, 2022 10:33
@alxndrsn alxndrsn marked this pull request as ready for review September 22, 2022 10:34
@matthew-white matthew-white requested review from sadiqkhoja and removed request for matthew-white September 22, 2022 17:44
Copy link
Member

@matthew-white matthew-white left a comment

Choose a reason for hiding this comment

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

I think @sadiqkhoja is going to take a look at the benchmarker, but I was wondering whether it'd be helpful to move the changes to lib/bin/check-file-headers.js to a separate PR. I'd be happy to take a look at those changes!

Also, I see the new file benchmarker/scripts/ci-initdb.js, but could lib/bin/create-docker-databases.js be used instead?

Copy link
Contributor

@sadiqkhoja sadiqkhoja left a comment

Choose a reason for hiding this comment

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

This is superb, really like it

@@ -11,7 +11,7 @@ jobs:

steps:
- checkout
- run: node lib/bin/check-file-headers.js
- run: git ls-files | node lib/bin/check-file-headers.js
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be helpful to have this script run as part of make test as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or a bit annoying when developing locally?


for (const entryPath of files) {
const contents = fs.readFileSync(entryPath).toString();
const withConsistentYear = contents.replace(/(Copyright 20)\d\d/, '$117');
Copy link
Contributor

Choose a reason for hiding this comment

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

can we ensure that year is also correct?

Copy link
Member

Choose a reason for hiding this comment

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

I've thought a little about this, and I think that might be tricky. We could try checking that all new files specify the current year in their file header — that'd work in most cases. But files are sometimes moved, which makes things hard: a file that was moved may look like a new file, yet specify a previous year in its file header. Things also get challenging around the year boundary, because a single PR may have commits from both years.

So I don't think CircleCI should fail if the year in the file header isn't the current year. If there's an easy way for it just to provide a warning in that case, I could see that being helpful in a follow-up PR — not sure what the possibilities there are.

timeout-minutes: 10
run: ./benchmarker/scripts/ci-benchmark
- name: Backend Logs
if: always()
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need if: always()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so...

Content-Disposition: form-data; name="xml_submission_file"; filename="submission.xml"\r
Content-Type: application/xml\r
\r
<data id="250_questions">
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any advantage of having random values here, only unique instanceID should suffice

Then we can move this to a separate xml file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Non-random values will likely affect behaviour and response size for zipped streams.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this could be moved to a separate file regardless, if that would be helpful.

benchmarker/index.js Outdated Show resolved Hide resolved
@matthew-white
Copy link
Member

It looks like there's a conflict now that #619 is merged. Might be worth rebasing?

@alxndrsn alxndrsn force-pushed the benchmarker-github-actions-master branch 2 times, most recently from 0cb2529 to be5723e Compare September 26, 2022 07:01
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