Skip to content

Conversation

@aliel
Copy link
Member

@aliel aliel commented Nov 5, 2025

tests was hanging because async mocks was not correctly configure

@aliel aliel requested review from nesitor and odesenfans and removed request for nesitor and odesenfans November 5, 2025 16:16
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.82%. Comparing base (dd11d1b) to head (a5a7e7b).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #847      +/-   ##
==========================================
- Coverage   64.85%   64.82%   -0.03%     
==========================================
  Files          88       88              
  Lines        8163     8159       -4     
  Branches      734      734              
==========================================
- Hits         5294     5289       -5     
- Misses       2639     2641       +2     
+ Partials      230      229       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aliel aliel force-pushed the aliel-fix-ci branch 10 times, most recently from 0b348ad to 72890e7 Compare November 7, 2025 08:09
…ble use another CCN URL to try to connect it."

Fix: Refactor API failover to prevent test timeouts
@aliel aliel force-pushed the aliel-fix-ci branch 2 times, most recently from cd63201 to ff48e9f Compare November 7, 2025 11:59
@aliel aliel force-pushed the aliel-fix-ci branch 2 times, most recently from 00fb772 to 35b842b Compare November 7, 2025 12:46
@aliel aliel requested a review from odesenfans November 10, 2025 06:51
await execution.start()
await execution.stop()
await asyncio.wait_for(execution.start(), timeout=300)
await asyncio.wait_for(execution.stop(), timeout=300)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why so long?

mkdir -p /opt/aleph/libs
# Fixing this protobuf dependency version to avoid getting CI errors as version 5.29.0 have this compilation issue.
pip3 install --target /opt/aleph/libs 'aleph-sdk-python==2.0.5' 'aleph-message~=1.0.5' 'fastapi~=0.120.1' 'protobuf==6.33.0'
pip3 install --target /opt/aleph/libs 'aleph-sdk-python==2.0.0' 'aleph-message~=1.0.5' 'fastapi~=0.121.0' 'protobuf==5.28.3'
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this needs to be changed by this PR. Revert?

return 500 * len(executions)

mocker.patch("aleph.vm.orchestrator.tasks.compute_required_flow", compute_required_flow)
mocker.patch("aleph.vm.orchestrator.tasks.compute_required_flow", new=compute_required_flow)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure this change is pertinent, it's more confusing than anything. I had to look up the doc to understand that new= was the second argument and that therefore this change changes nothing.

mocker.patch(
"aleph.vm.orchestrator.tasks.get_community_wallet_address",
new=mocker.AsyncMock(return_value=mock_community_wallet_address),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference in behavior with

mocker.patch("aleph.vm.orchestrator.tasks.get_community_wallet_address", return_value=mock_community_wallet_address)

? I don't think there's one.

return {"result": False, "reason": str(e)}
except Exception as e:
logger.error(f"Unexpected error in URL check: {e}", exc_info=True)
return {"result": False, "reason": str(e)}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is reimplementing what Andres did in another way right? Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants