[
https://issues.apache.org/jira/browse/CAMEL-27946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27946:
--------------------------------
Description:
Found while improving the option descriptions of camel-azure-functions for
CAMEL-23832 (commit
https://github.com/apache/camel/commit/bad83878ac9bc088cb788df6bdc3ddc8def71f1a,
pull request https://github.com/apache/camel/pull/31192).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. runtimeVersion is ignored
{{FunctionsProducer.createFunctionApp}} always defines the app with
withRuntimeVersion("~4"); the runtimeVersion option and the
CamelAzureFunctionsRuntimeVersion header are not used.
Proposed change: pass the configured value when set, else "~4".
h4. 2. createFunctionApp creates an unused storage account
{{FunctionsProducer.createFunctionApp}} gives the definition no storage
account, so the Azure resource manager (FunctionAppImpl.createAsync) creates a
new Standard_LRS storage account; Camel then overwrites AzureWebJobsStorage
with the given connection string, leaving the new account unused but billed.
Proposed change: set AzureWebJobsStorage and FUNCTIONS_WORKER_RUNTIME on the
definition before create(), or use withExistingStorageAccount (one create
instead of create + update).
h4. 3. subscriptionId required with appServiceManager
{{FunctionsComponent.validateConfiguration}} requires subscriptionId for
management operations even when appServiceManager is set, where it is not used.
Proposed change: skip the check when appServiceManager is set.
h4. 4. Smaller issues
updateFunctionAppConfiguration, tagResource and untagResource call
update().apply() once per entry (N round trips, not atomic). listFunctionApps:
the endpoint validation requires resourceGroup, so the subscription-wide branch
is only reached through the operation header. subscriptionId is marked secret
and resourceGroup has label security, but neither is a credential.
credentialType FUNCTION_KEY acts like AZURE_IDENTITY for management and is
ignored by invokeFunction.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-azure-functions for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31192).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. runtimeVersion is ignored
{{FunctionsProducer.createFunctionApp}} always defines the app with
withRuntimeVersion("~4"); the runtimeVersion option and the
CamelAzureFunctionsRuntimeVersion header are not used.
Proposed change: pass the configured value when set, else "~4".
h4. 2. createFunctionApp creates an unused storage account
{{FunctionsProducer.createFunctionApp}} gives the definition no storage
account, so the Azure resource manager (FunctionAppImpl.createAsync) creates a
new Standard_LRS storage account; Camel then overwrites AzureWebJobsStorage
with the given connection string, leaving the new account unused but billed.
Proposed change: set AzureWebJobsStorage and FUNCTIONS_WORKER_RUNTIME on the
definition before create(), or use withExistingStorageAccount (one create
instead of create + update).
h4. 3. subscriptionId required with appServiceManager
{{FunctionsComponent.validateConfiguration}} requires subscriptionId for
management operations even when appServiceManager is set, where it is not used.
Proposed change: skip the check when appServiceManager is set.
h4. 4. Smaller issues
updateFunctionAppConfiguration, tagResource and untagResource call
update().apply() once per entry (N round trips, not atomic). listFunctionApps:
the endpoint validation requires resourceGroup, so the subscription-wide branch
is only reached through the operation header. subscriptionId is marked secret
and resourceGroup has label security, but neither is a credential.
credentialType FUNCTION_KEY acts like AZURE_IDENTITY for management and is
ignored by invokeFunction.
_Claude Code on behalf of davsclaus_
> camel-azure-functions: runtimeVersion is ignored, createFunctionApp creates
> an unused storage account
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27946
> URL: https://issues.apache.org/jira/browse/CAMEL-27946
> Project: Camel
> Issue Type: Bug
> Components: camel-azure
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-azure-functions for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/bad83878ac9bc088cb788df6bdc3ddc8def71f1a,
> pull request https://github.com/apache/camel/pull/31192).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. runtimeVersion is ignored
> {{FunctionsProducer.createFunctionApp}} always defines the app with
> withRuntimeVersion("~4"); the runtimeVersion option and the
> CamelAzureFunctionsRuntimeVersion header are not used.
> Proposed change: pass the configured value when set, else "~4".
> h4. 2. createFunctionApp creates an unused storage account
> {{FunctionsProducer.createFunctionApp}} gives the definition no storage
> account, so the Azure resource manager (FunctionAppImpl.createAsync) creates
> a new Standard_LRS storage account; Camel then overwrites AzureWebJobsStorage
> with the given connection string, leaving the new account unused but billed.
> Proposed change: set AzureWebJobsStorage and FUNCTIONS_WORKER_RUNTIME on the
> definition before create(), or use withExistingStorageAccount (one create
> instead of create + update).
> h4. 3. subscriptionId required with appServiceManager
> {{FunctionsComponent.validateConfiguration}} requires subscriptionId for
> management operations even when appServiceManager is set, where it is not
> used.
> Proposed change: skip the check when appServiceManager is set.
> h4. 4. Smaller issues
> updateFunctionAppConfiguration, tagResource and untagResource call
> update().apply() once per entry (N round trips, not atomic).
> listFunctionApps: the endpoint validation requires resourceGroup, so the
> subscription-wide branch is only reached through the operation header.
> subscriptionId is marked secret and resourceGroup has label security, but
> neither is a credential. credentialType FUNCTION_KEY acts like AZURE_IDENTITY
> for management and is ignored by invokeFunction.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)