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

Mini Agent: Verify azure function env w/ filesystem #174

Merged
merged 6 commits into from
Jun 13, 2023

Conversation

thedavl
Copy link
Contributor

@thedavl thedavl commented Jun 12, 2023

What does this PR do?

Checks the azure function filesystem at specific paths for two files (host.json and function.json) to verify we're running in an azure function environment.

Motivation

azure functions (consumption plan) support

Additional Notes

How to test the change?

Unit tested + manually tested with linux + windows azure functions.

@thedavl thedavl changed the title verify azure function environment Mini Agent: Verify azure function env w/ filesystem Jun 12, 2023
@thedavl thedavl marked this pull request as ready for review June 12, 2023 18:48
@thedavl thedavl requested review from a team as code owners June 12, 2023 18:48
}

let env_type = maybe_env_type.unwrap_or_else(|| {
Copy link

Choose a reason for hiding this comment

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

Could we avoid using #[cfg(not(test))] and #[cfg(test)] here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed! process::exit is actually unnecessary here, we can just return

@maxday maxday self-requested a review June 13, 2023 16:25
@thedavl thedavl merged commit a8ba593 into main Jun 13, 2023
@thedavl thedavl deleted the david.lee/mini-agent-az-verification branch June 13, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants