-
Notifications
You must be signed in to change notification settings - Fork 2
EIM-330 Installer should no longer attempt to download constrainfile during offline installation #253
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
EIM-330 Installer should no longer attempt to download constrainfile during offline installation #253
Conversation
Summary of ChangesHello @Hahihula, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical bug where the installer would attempt to download constraint files even when performing an offline installation. The core of the fix involves refactoring the Python environment setup. The Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request refactors the offline installation process to avoid downloading the constraints file, which fixes the reported bug. The change correctly passes the offline archive directory to the tool setup function. It also removes duplicated code for Python environment installation by centralizing it within the setup_tools function.
While the code deduplication is a good improvement, I've pointed out a side-effect on the progress reporting for multi-version offline installations. The hardcoded progress percentages in setup_tools will lead to an incorrect and confusing progress bar for the user. I've suggested a way to make the progress reporting relative to fix this.
Overall, the change is in the right direction, and with the suggested improvement to progress reporting, it will be a solid contribution.
| }); | ||
|
|
||
| let export_vars = match setup_tools(&app_handle, &settings, &paths.idf_path, &paths.actual_version).await { | ||
| let export_vars = match setup_tools(&app_handle, &settings, &paths.idf_path, &paths.actual_version, Some(offline_archive_dir.path())).await { |
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.
This refactoring is a good step towards removing duplicated code. However, by moving the Python environment setup into setup_tools, the progress reporting for offline installations is now incorrect.
The setup_tools function uses hardcoded percentage values for progress updates (e.g., 65% for tools, 90% for Python). When setup_tools is called inside a loop for multiple versions in start_offline_installation, this will cause the progress bar to jump back to these hardcoded values for each version, providing a confusing user experience.
The original code, although duplicated, had logic to calculate progress relative to the overall installation of multiple versions.
To fix this, you could consider making the progress reporting in setup_tools relative. This could be done by passing progress_base and progress_range as arguments to setup_tools and calculating all internal progress percentages based on these values. This would require updating all call sites of setup_tools but would result in a more robust progress reporting mechanism for all installation types.
0a55674 to
3b28055
Compare
Fabricio-ESP
left a comment
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.
Confirmed this step is now working.
…during offline installation
3b28055 to
e42e19a
Compare
this should fix bug reported in #245