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

Experiment: Run static checks and postgres tests before all else #27971

Closed
wants to merge 6 commits into from

Conversation

dstandish
Copy link
Contributor

@dstandish dstandish commented Nov 28, 2022

This should may (?) allow for faster failure / iteration time on non-hosted runners.

This should allow for faster failure / iteration time on non-hosted runners.
@dstandish dstandish added the use public runners Makes sure that Public runners are used even if commiters creates the PR (useful for testing) label Nov 28, 2022
@dstandish dstandish removed the use public runners Makes sure that Public runners are used even if commiters creates the PR (useful for testing) label Nov 28, 2022
@dstandish dstandish closed this Nov 28, 2022
@dstandish dstandish reopened this Nov 28, 2022
@@ -778,8 +780,8 @@ jobs:
needs: [build-info, wait-for-ci-images]
strategy:
matrix:
python-version: "${{fromJson(needs.build-info.outputs.python-versions)}}"
postgres-version: "${{fromJson(needs.build-info.outputs.postgres-versions)}}"
python-version: ["3.7"]
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit dangerous and not needed. For most cases (as of last week) the exclude matrices are only selecting "representative" combos for tests - so you do not save by hard-conding those I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah both this and putting test-postgres everywhere was just for testing

@@ -366,7 +368,7 @@ jobs:
${{needs.build-info.outputs.build-job-description}} PROD images
${{needs.build-info.outputs.all-python-versions-list-as-string}}
runs-on: "${{needs.build-info.outputs.runs-on}}"
needs: [build-info, build-ci-images]
needs: [build-info, build-ci-images, tests-postgres]
Copy link
Member

@potiuk potiuk Nov 28, 2022

Choose a reason for hiding this comment

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

I suggest to introduce an empty "smoke-tests" job that will be dependent o tests-postgres and use dependency like.

[build-info, smoke-tests]

This will be much more "generic". Unlike build-info (which is used in "needs.build-info", we do not need build-ci-images if "smoke-tests" (or "tests-postgres" depend on it already. Unfortunately github actions dependencies are not transitive and if we need "build-info" outputs, in needs clause we need to add it here.

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 agree, if we want to do something like that... this would be the way to go.

@potiuk
Copy link
Member

potiuk commented Nov 28, 2022

I am not sure if this is helpful,

For non-hosted runners it should be no difference. We already have 900 runners by the ASF and we should have no more queueing here (at least we stopped seeing those) - so this is pretty ok to run all test types in parallel. And it will introduce significant "sequential" delays in case of non-postgres failures I am afraid. Rather than running tests in parallel, it will run them sequentially so "feedback time" will be biggeer.

When optimising CI builds there are two aspects:

  • feedback time
  • cost (build hours usage)

Feedback time is very important - the time between push and "result" should be as short as possible. Putting sequential dependency between tests increases feedback time, but saves cost (assuming job queue is infinite - and with 900 jobs in the ASF as of 3 weeks, for now - until ASF usage grows significantly it almost is - we used to have 300) . Cost does not matter - it is essentially free.

@dstandish
Copy link
Contributor Author

yeah i agree. i was actually just about to close the PR.

@dstandish dstandish closed this Nov 28, 2022
@dstandish
Copy link
Contributor Author

it would help if there were too many PRs competing for too few runners -- then we quickly get a quick read on the tests most likely to fail. but that doesn't really seem to be the case here.

@jedcunningham jedcunningham deleted the allow-faster-fail-ci branch November 28, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants