Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.96k stars 4.09k forks source link

Index not found - looks like hooks are not fired up #1603

Open karol-pieciukiewicz opened 4 months ago

karol-pieciukiewicz commented 4 months ago

Pipeline for services creation runs successfully, however I'm missing index in cognitive search and authentication in the app service. anyone faced this issue?

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Fork repo and run deploy. Configuration of the pipeline: image

Any log messages given by the failure

The pipeline can be found here: https://github.com/azure-way/rag/actions/runs/9015766065 In the infrastrucuture provision I have message: hooks.go:52: azd environment is not available, skipping all hook registrations.

Expected/desired behavior

run hooks for index creation

OS and Version?

GitHub runner version: '2.316.1'

azd version?

azd version 1.9.0

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

pamelafox commented 4 months ago

Hm, I haven't seen that before. @vhvb1989 Could you take a look at that pipeline? It looks like it skipped the hooks for some reason.

vhvb1989 commented 4 months ago

It is an issue on azd. I've created: https://github.com/Azure/azure-dev/issues/3920 Also create PR for you @karol-pieciukiewicz : https://github.com/azure-way/rag/pull/1 with a workaround you can use.

@pamelafox , this means that any project-hook is currently ignored in CI :(

karol-pieciukiewicz commented 4 months ago

Thanks Victor!

I saw the message that the environment doesn't exist, but I didn't figure out that I needed to create it manually. Thanks for pointing that out. When you have a new version of AZD I can make some tests if needed :)

Best Karol Pieciukiewicz

czw., 16 maj 2024 o 22:58 Victor Vazquez @.***> napisał(a):

It is an issue on azd. I've created: Azure/azure-dev#3920 https://github.com/Azure/azure-dev/issues/3920 Also create PR for you @karol-pieciukiewicz https://github.com/karol-pieciukiewicz : azure-way#1 https://github.com/azure-way/rag/pull/1 with a workaround you can use.

@pamelafox https://github.com/pamelafox , this means that any project-hook is currently ignored in CI :(

— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/azure-search-openai-demo/issues/1603#issuecomment-2116165752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU24ZYZXOGGNWRGT66P543TZCUMX7AVCNFSM6AAAAABHOWEWTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJWGE3DKNZVGI . You are receiving this because you were mentioned.Message ID: @.***>

karol-pieciukiewicz commented 4 months ago

Hi,

I've also found an error while setting up authorization. If you run os.getenv("XXX", "default"), then "default" will be returned only when the env doesn't exist. However, this environment variable exists, but it's empty, due too this pipeline part: [image: image.png]

I've prepared the fix: https://github.com/azure-way/rag/commit/b735ca6fd8c373909c0d41686cd40b5c11e7ecc3

If you would like, I can make a PR.


Pozdrawiam Karol Pieciukiewicz

pt., 17 maj 2024 o 22:51 Karol Pieciukiewicz @.***> napisał(a):

Thanks Victor!

I saw the message that the environment doesn't exist, but I didn't figure out that I needed to create it manually. Thanks for pointing that out. When you have a new version of AZD I can make some tests if needed :)

Best Karol Pieciukiewicz

czw., 16 maj 2024 o 22:58 Victor Vazquez @.***> napisał(a):

It is an issue on azd. I've created: Azure/azure-dev#3920 https://github.com/Azure/azure-dev/issues/3920 Also create PR for you @karol-pieciukiewicz https://github.com/karol-pieciukiewicz : azure-way#1 https://github.com/azure-way/rag/pull/1 with a workaround you can use.

@pamelafox https://github.com/pamelafox , this means that any project-hook is currently ignored in CI :(

— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/azure-search-openai-demo/issues/1603#issuecomment-2116165752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU24ZYZXOGGNWRGT66P543TZCUMX7AVCNFSM6AAAAABHOWEWTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJWGE3DKNZVGI . You are receiving this because you were mentioned.Message ID: @.*** com>

pamelafox commented 4 months ago

@karol-pieciukiewicz Ah good catch, we have to do similar checks in our other code, though we've been using os.getenv(BLA) or default. Having a helper function makes sense, PR welcome!