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: Ditch docker #34502

Closed
wants to merge 10 commits into from
Closed

Conversation

alankritdabral
Copy link

@alankritdabral alankritdabral commented Jan 30, 2025

#30706
Removing Docker and using uv cache along with actions/cache for APT.

  • Docker runtime for setup-with-retry: ~60 sec

  • Without Docker runtime for setup-with-retry: ~50 sec

    Breakdown:

  1. Execution time for git fs pull: ~4 sec
  2. Execution time for installing cached APT: ~35 sec
  3. Execution time for uv cache: ~7 sec

@alankritdabral alankritdabral changed the title ci: Ditch docker ci: Ditch docker from ci Jan 30, 2025
@alankritdabral alankritdabral changed the title ci: Ditch docker from ci ci: Ditch docker Jan 30, 2025
# build our docker image
start=$(date +%s)
cd ~/apt-cache/archives
sudo dpkg -i *.deb || sudo apt-get install -f -y
Copy link
Author

@alankritdabral alankritdabral Jan 30, 2025

Choose a reason for hiding this comment

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

Adding this step to save 5 seconds on sudo apt update.
Will improve in future commits.

@alankritdabral
Copy link
Author

I'm thinking of creating a shell script like this example to cache APT dependencies.

Any suggestions for improvement are welcome!

Comment on lines -211 to +220
path = Path(os.path.join("/sys/fs/pstore/", fn))
if path.is_file():
with open(path, "rb") as f:
expected_val = f.read()
bootlog_val = [e.value for e in boot.pstore.entries if e.key == fn][0]
assert expected_val == bootlog_val

path = Path(os.path.join("/sys/fs/pstore/", fn))
try:
file_exists = path.is_file()
except PermissionError:
file_exists = False
if file_exists:
with open(path, "rb") as f:
expected_val = f.read()
bootlog_val = [e.value for e in boot.pstore.entries if e.key == fn][0]
assert expected_val == bootlog_val
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated?

Copy link
Author

Choose a reason for hiding this comment

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

While running unit tests on the Ubuntu runner, I encountered a permission error for /sys/fs/pstore/. couldn't find a solution, so I made this temporary change.

Copy link
Author

@alankritdabral alankritdabral Feb 1, 2025

Choose a reason for hiding this comment

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

you can check the error in this alankritdabral#22

@maxime-desroches
Copy link
Contributor

Overall can you remove all changes like formatting and only commit what is absolutely necessary

@@ -18,15 +18,9 @@ concurrency:
cancel-in-progress: true

env:
PYTHONWARNINGS: error
BASE_IMAGE: openpilot-base
PYTHONWARNINGS: "ignore::DeprecationWarning"
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need this

Copy link
Author

Choose a reason for hiding this comment

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

Its giving a deprecation warning regarding setuptools and distutils. I have tried with many versions of Python, and this was the only solution I could get.

Copy link
Author

@alankritdabral alankritdabral Feb 1, 2025

Choose a reason for hiding this comment

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

you can check the error in this pr

@alankritdabral alankritdabral marked this pull request as ready for review February 2, 2025 15:08
@adeebshihadeh
Copy link
Contributor

This isn't even remotely close to 20s?

@maxime-desroches
Copy link
Contributor

Closing this for now. A 300 lines diff for less than a 10s speedup is not worth it in this state. Also, before asking for review, please address and fix the already existing reviews.

If you want to try this again, make sure to re-read the original issue.

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.

3 participants