Skip to content

Unable to interact properly in the chatbox after azd up #16

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

Closed
Menghua1 opened this issue Apr 3, 2025 · 6 comments
Closed

Unable to interact properly in the chatbox after azd up #16

Menghua1 opened this issue Apr 3, 2025 · 6 comments
Assignees

Comments

@Menghua1
Copy link

Menghua1 commented Apr 3, 2025

Description:
After running azd up, clicking the endpoint link in the logs and attempting to start a conversation fails with the following error:
Image

Repro Steps:

  1. Run git clone https://github.com/neondatabase-labs/rag-neon-postgres-openai-azure-python.
  2. Run cd rag-neon-postgres-openai-azure-python.
  3. Run python3 -m venv .venv.
  4. Run .\.venv\Scripts\activate.
  5. Run pip install -r requirements-dev.txt.
  6. Run pip install -e src/backend.
  7. Run azd auth login.
  8. Run azd env new.
  9. Run azd up.
  10. Click the endpoint link of the service web.
  11. Send a question.

Environment:

  • Azd version: azd version 1.14.0 (commit c928795c47f27d1e997c217147dc649054ac05c8)
  • OS: Windows, Devcontainer, Codespaces.

Expected behavior:
Able to interact successfully in the chatbox.

@Boburmirzo and @hemarina for notification.

@Boburmirzo
Copy link
Contributor

@Menghua1 @v-xuto Thanks for testing this! It looks like you missed setting manually Neon database credentials after the deployment.

54c608c

I added a step in the Readme. Could you test it again to see if it works for you? Thanks!

@Boburmirzo Boburmirzo self-assigned this Apr 5, 2025
@Boburmirzo
Copy link
Contributor

I have just tested with the new update and it is working. Make sure that you have Neon correct credentials set to the contianer environment variables

Image Image Image

@Menghua1
Copy link
Author

Menghua1 commented Apr 7, 2025

@Boburmirzo According to the latest Readme.md, after running azd up, it failed to find the Neon Serverless Postgres Organization service from the Azure portal. The Neon Serverless Postgres Organization service does not exist in the resource group just created.

According to the investigation, it is because in the serverlessPostgres.bicep file, the neonDatabaseName is not empty, so shouldCreateNeon is equal to false and the resource Neon Serverless Postgres Organization service will not be created.
Image

Update the code var shouldCreateNeon = empty(neonDatabaseName) to var shouldCreateNeon = !empty(neonDatabaseName) and running azd up, the Neon database resource was successfully created. After setting environment variable values ​​for NeonDB and running azd deploy, the corresponding values in the Azure Container App were not updated. Normally, this should be done via azd provision, but running azd provision resulted in an error.
Image

Repro Steps:

  1. Run git clone https://github.com/neondatabase-labs/rag-neon-postgres-openai-azure-python.
  2. Run cd rag-neon-postgres-openai-azure-python.
  3. Run python3 -m venv .venv.
  4. Run .\.venv\Scripts\activate.
  5. Run pip install -r requirements-dev.txt.
  6. Run pip install -e src/backend.
  7. Run azd auth login.
  8. Run azd env new.
  9. Run azd up.
  10. Obtain Neon Database Credentials.
  11. Run azd env set to set environment variable values ​​for NeonDB.
  12. Run azd provision.

Environment:

  • Azd version: azd version 1.14.0 (commit c928795c47f27d1e997c217147dc649054ac05c8)
  • OS: Windows, Devcontainer, Codespaces.

Expected behavior:
The second run of azd provision can succeed.

@Boburmirzo Boburmirzo reopened this Apr 7, 2025
@Boburmirzo
Copy link
Contributor

@Menghua1 Thanks for finding this issue!

It looks like latest fix I did introduced another issue. I will fix it shortly asap.

@Boburmirzo
Copy link
Contributor

@Menghua1 Thanks for finding this issue!

It looks like latest fix I did introduced another issue. I will fix it shortly asap.

But it is interesting why azd deploy is not updating the container environment variables.

@Boburmirzo
Copy link
Contributor

Boburmirzo commented Apr 7, 2025

Image

@Menghua1 Now it should work. I added the parameter DEPLOY_NEON_SERVERLESS_POSTGRES to manage if the Neon resource exists or not. You can set it to false to skip deployment when you run azd provision.

In the meantime, let me know if you can suggest another better way to handle this. Thanks!

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

No branches or pull requests

2 participants