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

Fixes issue 235 by completing CLI deploy command #257

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

maximilien
Copy link
Member

fixes issue 235 but does not work. Needed:

  • --dry-run option for Deploy
    OR
  • fix issue when deploying now without a deployments directory (maybe allow to specify path)

@akihikokuroda let's do the easiest thing to get this working then we can iterate and improve

This is the output when I run: test-fail-output.txt

* --dry-run option for  OR
* fix issue when deploying now without a deployments directory
@maximilien maximilien self-assigned this Feb 21, 2025

try:
if self.docker():
deploy = Deploy(agents_yaml, workflow_yaml, bee_api_key, bee_api, self.url())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding "DRY_RUN=1" here enables the dry run.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The Deploy constructor is expecting like this:

deploy = Deploy("../tests/examples/condition_agents.yaml", "../tests/examples/condition_workflow.yaml", "BEE_API_KEY=sk-proj-testkey BEE_API=http://192.168.86.45:4000")

The format of the environment variables is like "key1=value1 key2=value2"

@akihikokuroda
Copy link
Collaborator

There is an issue that the Deploy class has to be executed at src directory now. I'll look into it.

@akihikokuroda
Copy link
Collaborator

#254 fixes the working directory issue.

@maximilien
Copy link
Member Author

Thank you @akihikokuroda. I will rebase and resubmit this PR.

@maximilien
Copy link
Member Author

maximilien commented Feb 24, 2025

@akihikokuroda getting a series of issues ... maybe you can take a look

  1. deploy tests are failing but seems like I am doing the right thing... since the deploy starts but then fails
  2. when deploy tests fails it leaves the tmp2 directory and does not clean up. This causes all tests to fail until that directory is deleted.

I am passing --dry-run BTW

You can check this by doing the following:

gh pr checkout 257
...
pytest

Including output here: issue235_pytest_output.txt

@maximilien
Copy link
Member Author

Made some changes @akihikokuroda and got further but still failing. FYI

The issue of tmp2 directory still there. I think it's because the test fails and the deploy does not have a chance to clean up... at a minimum we need to have that tmp2 be located in the user's temp directory so it does not polute the current. WDYT?

@akihikokuroda
Copy link
Collaborator

akihikokuroda commented Feb 25, 2025

@maximilien Yes, I want to move the temp directory somewhere else. I'll look into why the directory returned by tempfile.gettempdir is not writable in my Mac.

I put fix in #264

@maximilien
Copy link
Member Author

OK will try this again now that #264 is merged. Likely in a few hours

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.

2 participants