-
Notifications
You must be signed in to change notification settings - Fork 7.1k
cleanup CI config #4983
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
cleanup CI config #4983
Conversation
💊 CI failures summary and remediationsAs of commit 8513fab (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Job | Step | Action |
---|---|---|
Update Homebrew | 🔁 rerun | |
Update Homebrew | 🔁 rerun |
This comment was automatically generated by Dr. CI (expand for details).
Please report bugs/suggestions to the (internal) Dr. CI Users group.
Oh well, the ONNX failure is valid and exists since #4692 cc @prabhat00155. Currently we run the tests with vision/.circleci/config.yml.in Line 261 in 8d25de7
Since we have Lines 586 to 587 in 8d25de7
the tests are correctly run, but the process doesn't exit with a non-zero return code so the CI doesn't pick up on the failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmeier , this is helpful. I made a few comments below but this looks good overall, LMK what you think.
Also I marked all of the CodeQL issues as "wontfix". They're all completely unrelated to this PR... not sure why they show up now and more importantly, why here. But ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pmeier
@@ -99,6 +99,81 @@ commands: | |||
- brew_install: | |||
formulae: libtool | |||
|
|||
apt_install: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first sight this entire blob does not really look like an obvious improvement. It's hard to figure out what it does, or why it's needed. Same for pip_install
I would say.
We might as well just inline everything I think, there would be a bit of repetition, but at least things would remain obvious. My second-best suggestion would be to revert to what you had before, and rely on regenerate.py
(although I'm not a fan either).
But I'll leave it up to you to decide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first sight this entire blob does not really look like an obvious improvement. It's hard to figure out what it does, or why it's needed.
It handles running as super-user, updating the repository database, confirming choices, and suppressing output for you. Compare
steps:
- run: sudo apt update -qy && sudo apt install -qy $PACKAGES
with
steps:
- apt_install:
args: $PACKAGES
Not having this as a central command means that every call to it will be a little different. In times this means only cluttering the log (forgetting -q
), whereas in other situations it fails the job (forgetting sudo
).
Same for
pip_install
I would say.
Same argument. Compare
steps:
- run: pip install --user --progress-bar=off $PACKAGES
with
steps:
- pip_install:
args: $PACKAGES
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, a fairer comparison would be to compare the repeated use of
steps:
- run: sudo apt update -qy && sudo apt install -qy $PACKAGES
vs
apt_install:
parameters:
args:
type: string
descr:
type: string
default: ""
update:
type: boolean
default: true
steps:
- run:
name: >
<<^ parameters.descr >> apt install << parameters.args >> <</ parameters.descr >>
<<# parameters.descr >> << parameters.descr >> <</ parameters.descr >>
command: |
<<# parameters.update >> sudo apt update -qy <</ parameters.update >>
sudo apt install << parameters.args >>
(and the associated cost of understanding and maintaining it) plus the repeated use of
steps:
- apt_install: args: $PACKAGES
It's probably not the case, but worth checking that the recent failures on the CI are not the result of this PR. I check this at #5011. |
@datumbox the ONNX failure was "introduced" by this PR. See #4983 (comment). |
@pmeier Thanks for confirming. I assume you will address on a follow up soon? |
I hope @prabhat00155 can do this, since the error was only surfaced by this PR, but was introduced in #4692. Since I'm unfamiliar with the topic at hand, I could xfail it to make the CI green again and open an issue for someone else to fix. Otherwise, we could also revert the other PR, since it clearly introduced incorrect behavior. |
@prabhat00155 Could you confirm you plan to pick it up and provide the issue number where we track progress? Just making sure this is tracked as it's high priority. |
Opened an issue to track this. |
Summary: * [DIRTY] cleanup CI config * remove pip install command * fix syntax * fix jobs * fix syntax * add support for editable install * sync * fix sudo apt install * fix editable install * sync * try pip without user install * [DIRTY] address review comments * [DIRTY] try use dynamic name * switch logic * address remaining comments * cleanup * more cleanup * fix enabling prototype tests * Update .circleci/config.yml.in * linebreak Reviewed By: NicolasHug Differential Revision: D32759203 fbshipit-source-id: 1d3149d1e43a503ee6f7cb9e2ac2935587ea23d7 Co-authored-by: Nicolas Hug <[email protected]> Co-authored-by: Nicolas Hug <[email protected]>
This PR cleans up our CircleCI config in a number of ways:
checkout_and_install
orrun_tests
, which are used in multiple jobsvision/.circleci/config.yml
Lines 200 to 209 in 8d25de7
into multiple steps to be able to see at a glance which part failed
build
workflow also groups the lint jobs as well as a few unittest jobs. Note that this will not run the workflows multiple times, but is still inconsistent with how workflows are supposed to be used. This is partially caused by this "unconditional condition"vision/.circleci/config.yml.in
Lines 1000 to 1023 in 8d25de7
that was added without comment in Packaging fixes #1214. Unless this is not overwritten / patched in FBcode, I think it is fine to remove it.
{{ pip_install }}
and{{ apt_install }}
templates, which will be expanded byregenerate.py
to handle permissions and disabling progress outputcc @seemethere