You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a stack with the "old" function name, i.e. using a CLI version 0.8.0 or earlier
Attempt to update it with newrelic-lambda integrations update ... using CLI version 0.9.0
Expected Behaviour
The update should succeed, either renaming the function or preserving it with the old name.
It looks like #254 may have introduced some if statements that aren't working as intended given its stated goal of preserving compatibility.
def get_unique_newrelic_log_ingestion_name(session, stackname=None):
if not stackname:
stackname = INGEST_STACK_NAME
stack_id = _get_cf_stack_id(session, stack_name=stackname)
if stack_id:
return "newrelic-log-ingestion-%s" % (stack_id.split("/")[2].split("-")[4])
def get_newrelic_log_ingestion_function(session, stackname=None):
unique_log_ingestion_name = get_unique_newrelic_log_ingestion_name(
session, stackname
)
if unique_log_ingestion_name:
function = get_function(session, unique_log_ingestion_name)
return function
In addition, it would be nice if the logs were more specific about which function doesn't exist. I would've identified the problem with far less effort if the error printed out No newrelic-log-ingestion-0aa... function in region, given we do have function called newrelic-log-ingestion as literally appears in the error message. NOTE: # ( Tell us what you expected to happen. )
Relevant Logs / Console output
Your Environment
ex: Browser name and version:
ex: Operating System and version:
Additional context
The text was updated successfully, but these errors were encountered:
Description
Testing if JIRA integration is working
#267
Steps to Reproduce
Create a stack with the "old" function name, i.e. using a CLI version 0.8.0 or earlier
Attempt to update it with newrelic-lambda integrations update ... using CLI version 0.9.0
Expected Behaviour
The update should succeed, either renaming the function or preserving it with the old name.
It looks like #254 may have introduced some if statements that aren't working as intended given its stated goal of preserving compatibility.
newrelic-lambda-cli/newrelic_lambda_cli/integrations.py
Lines 89 to 103 in f472e28
def get_unique_newrelic_log_ingestion_name(session, stackname=None):
if not stackname:
stackname = INGEST_STACK_NAME
stack_id = _get_cf_stack_id(session, stack_name=stackname)
if stack_id:
return "newrelic-log-ingestion-%s" % (stack_id.split("/")[2].split("-")[4])
def get_newrelic_log_ingestion_function(session, stackname=None):
unique_log_ingestion_name = get_unique_newrelic_log_ingestion_name(
session, stackname
)
if unique_log_ingestion_name:
function = get_function(session, unique_log_ingestion_name)
return function
In addition, it would be nice if the logs were more specific about which function doesn't exist. I would've identified the problem with far less effort if the error printed out No newrelic-log-ingestion-0aa... function in region, given we do have function called newrelic-log-ingestion as literally appears in the error message.
NOTE: # ( Tell us what you expected to happen. )
Relevant Logs / Console output
Your Environment
Additional context
The text was updated successfully, but these errors were encountered: