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

Fix infinite loop in dev mode #2304

Merged
merged 13 commits into from
Feb 18, 2025
Merged

Conversation

Adamantios
Copy link
Collaborator

@Adamantios Adamantios commented Feb 12, 2025

Proposed changes

Fixes an infinite loop in the dev mode.

Notice how the CI times out due to the infinite loop on the base and how it fails instead in this PR.

Fixes

n/a

Types of changes

What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an x in the box that applies

  • Non-breaking fix (non-breaking change which fixes an issue)
  • Breaking fix (breaking change which fixes an issue)
  • Non-breaking feature (non-breaking change which adds functionality)
  • Breaking feature (breaking change which adds functionality)
  • Refactor (non-breaking change which changes implementation)
  • Messy (mixture of the above - requires explanation!)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have locally run services that could be impacted and they do not present failures derived from my changes
  • Public-facing documentation has been updated with the changes affected by this PR. Even if the provided contents are not in their final form, all significant information must be included.
  • Any backwards-incompatible/breaking change has been clearly documented in the upgrading document.

Further comments

n/a

This reverts commits 3cb05bc && cd3a205.
The deployment build process requires the directories.

This commit properly fixes the issue that was worked around in #2292 and rolled back in e214049.
@Adamantios Adamantios added cli CLI feature requests open-autonomy Related to open-autonomy framework labels Feb 12, 2025
autonomy/cli/deploy.py Outdated Show resolved Hide resolved
Fix the regressed packages' tests

[no ci]
Fix the regressed CLI tests

[no ci]
Fix `autonomy deploy build` command

[no ci]
Adamantios added a commit that referenced this pull request Feb 18, 2025
- Replaced `while` loop with a `for`, using `itertools.chain` for cleaner iteration over path and parents (#2304 (comment)).
- Used `is_file()` instead of `exists()` to explicitly check for `packages.json`.
- Improved error message for clarity.
- Simplified path resolution by avoiding redundant `Path(path)`.
@Adamantios Adamantios requested a review from solarw February 18, 2025 11:06
- Replaced `while` loop with a `for`, using `itertools.chain` for cleaner iteration over path and parents (#2304 (comment)).
- Used `is_file()` instead of `exists()` to explicitly check for `packages.json`.
- Improved error message for clarity.
- Simplified path resolution by avoiding redundant `Path(path)`.
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (chore/continue-on-error@17e51da). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                     @@
##             chore/continue-on-error    #2304   +/-   ##
==========================================================
  Coverage                           ?   93.13%           
==========================================================
  Files                              ?      225           
  Lines                              ?    16363           
  Branches                           ?        0           
==========================================================
  Hits                               ?    15240           
  Misses                             ?     1123           
  Partials                           ?        0           
Flag Coverage Δ
unittests 93.13% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Adamantios Adamantios merged commit bd50034 into chore/continue-on-error Feb 18, 2025
22 of 23 checks passed
@Adamantios Adamantios deleted the fix/infinite-loop branch February 18, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli CLI feature requests fix open-autonomy Related to open-autonomy framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants