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

Add application insights connection string support - APPLICATIONINSIGHTS_CONNECTION_STRING #19855

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

Greybird
Copy link

@Greybird Greybird commented May 10, 2024

Task names:

  • AzureFunctionAppContainerV1
  • AzureFunctionAppV1
  • AzureFunctionAppV2
  • AzureRmWebAppDeploymentV3
  • AzureRmWebAppDeploymentV4
  • AzureWebAppContainerV1
  • AzureWebAppV1

Description:
The PR adds support for adding release annotations when the now recommended APPLICATIONINSIGHTS_CONNECTION_STRING setting is used on Azure, rather than the APPINSIGHTS_INSTRUMENTATIONKEY, for all tasks supporting this feature.

Documentation changes required:
I don't think so.

Added unit tests:
No.
I did not find tests for release annotation based on InstrumentationKey.
I had a hard time figuring how to add unit tests for the connection string use case, and tests seem to come from another zone of the code.
Happy to get guidance on the matter however.

Attached related issue:
#18796 (closed due to being stale, probably needs reopening)

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected (tested on our organization by publishing a preview task as explained in documentation)

Copy link
Contributor

@FinVamp1 FinVamp1 left a comment

Choose a reason for hiding this comment

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

Can you update the Task.json as mentioned?

@Greybird
Copy link
Author

Can you update the Task.json as mentioned?

Sure, I just did, and updated issue template too. Feel free to point any mistake I would have made in the process of course!

Copy link
Contributor

@FinVamp1 FinVamp1 left a comment

Choose a reason for hiding this comment

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

Looks good to me from the Function side of things. Thanks for the contribution.

Arnaud TAMAILLON added 2 commits May 11, 2024 10:50
…s-connection-string

# Conflicts:
#	Tasks/AzureRmWebAppDeploymentV3/task.json
#	Tasks/AzureRmWebAppDeploymentV3/task.loc.json
#	Tasks/AzureRmWebAppDeploymentV4/task.json
#	Tasks/AzureRmWebAppDeploymentV4/task.loc.json
#	_generated/AzureRmWebAppDeploymentV3.versionmap.txt
#	_generated/AzureRmWebAppDeploymentV3/task.json
#	_generated/AzureRmWebAppDeploymentV3/task.loc.json
#	_generated/AzureRmWebAppDeploymentV3_Node20/task.json
#	_generated/AzureRmWebAppDeploymentV3_Node20/task.loc.json
#	_generated/AzureRmWebAppDeploymentV4.versionmap.txt
#	_generated/AzureRmWebAppDeploymentV4/task.json
#	_generated/AzureRmWebAppDeploymentV4/task.loc.json
#	_generated/AzureRmWebAppDeploymentV4_Node20/task.json
#	_generated/AzureRmWebAppDeploymentV4_Node20/task.loc.json
@Greybird
Copy link
Author

hi @jvano, @dannysongg, @manolerazvan, @patelchandni,
Sorry to ping you directly ; do not hesitate to redirect me to proper instructions if I missed anything.

Could you guide me on how to have this pr be reviewed and integrated ?
I could take quite a long time to have all reviews, and as we have to integrate sprint number into the PR, I might have to merge/update quite often as the number of people involved is large.

Copy link

@jvano jvano left a comment

Choose a reason for hiding this comment

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

:shipit:

@Greybird
Copy link
Author

Thanks @jvano, @manolerazvan !

@dannysongg, @patelchandni, could you please take a look ?

@FinVamp1
Copy link
Contributor

Thanks @jvano, @manolerazvan !

@dannysongg, @patelchandni, could you please take a look ?

Hello @Greybird I think in this instance Joaquin and Danny are part of the Web Apps task team and Chandni and I are part of the Functions team so just one approval is probably needed from each team.

@Greybird
Copy link
Author

@FinVamp1, you are right, sorry,
I have been confused by the "2 pending reviewers" mention, while the changes are actually approved. Thanks for pointing this!

I suppose there is nothing left for me to do currently, as checks now have to run, which I believe depends on some validation on Microsoft side ?
Do not hesitate to point to needed actions if I am wrong.

Thanks again for your guidance with the process !

@Greybird
Copy link
Author

Greybird commented Jun 3, 2024

Hello,

I updated sprint to 241.
I don't know how I can help further to have this PR merged.

@v-schhabra
Copy link
Contributor

v-schhabra commented Jul 10, 2024

Hi @Greybird
I could see you have not updated task.json file for AzureFunctionAppContainerV1, AzureFunctionAppV1, AzureFunctionAppV2, AzureWebAppContainerV1 and AzureWebAppV1 tasks.
Incase you missed to update task.json file please update it or is it purposefully ignored?
And please let us know if you tested the tasks after doing these changes or not?

@Greybird
Copy link
Author

Hi @v-schhabra ,

Thanks for pointing this. Indeed the merge with master collided with changes, and I forgot to apply versioning to these task.json files.
I merged again with master, and reapplied patch versions.
To me everything should be correct now, but if you find anything missing, please tell me!

@v-schhabra v-schhabra requested a review from geekzter July 10, 2024 12:24
@geekzter geekzter removed their request for review July 10, 2024 13:12
@Greybird
Copy link
Author

Forgot to answer your question @v-schhabra: yes I conducted tests by publishing these tasks under new guids to a private org, and they worked.

@Greybird
Copy link
Author

Greybird commented Jul 15, 2024

Hi @v-schhabra,
I rebased on master again, and switched to sprint 243.
Did you find a way to have pipelines pass on the PR ? Is there another way to manage this situation ?

Arnaud TAMAILLON added 2 commits July 21, 2024 09:18
…s-connection-string

# Conflicts:
#	Tasks/AzureFunctionAppContainerV1/task.json
#	Tasks/AzureFunctionAppContainerV1/task.loc.json
#	Tasks/AzureFunctionAppV1/task.json
#	Tasks/AzureFunctionAppV1/task.loc.json
#	Tasks/AzureFunctionAppV2/task.json
#	Tasks/AzureFunctionAppV2/task.loc.json
#	Tasks/AzureWebAppV1/task.json
#	Tasks/AzureWebAppV1/task.loc.json
#	_generated/AzureFunctionAppContainerV1.versionmap.txt
#	_generated/AzureFunctionAppContainerV1/task.json
#	_generated/AzureFunctionAppContainerV1/task.loc.json
#	_generated/AzureFunctionAppContainerV1_Node20/task.json
#	_generated/AzureFunctionAppContainerV1_Node20/task.loc.json
#	_generated/AzureFunctionAppV1.versionmap.txt
#	_generated/AzureFunctionAppV1/task.json
#	_generated/AzureFunctionAppV1/task.loc.json
#	_generated/AzureFunctionAppV1_Node20/task.json
#	_generated/AzureFunctionAppV1_Node20/task.loc.json
#	_generated/AzureFunctionAppV2.versionmap.txt
#	_generated/AzureFunctionAppV2/task.json
#	_generated/AzureFunctionAppV2/task.loc.json
#	_generated/AzureFunctionAppV2_Node20/task.json
#	_generated/AzureFunctionAppV2_Node20/task.loc.json
#	_generated/AzureWebAppV1.versionmap.txt
#	_generated/AzureWebAppV1/task.json
#	_generated/AzureWebAppV1/task.loc.json
#	_generated/AzureWebAppV1_Node20/task.json
#	_generated/AzureWebAppV1_Node20/task.loc.json
@Greybird
Copy link
Author

Hi @v-schhabra ,
I rebased on master (again), and bumped the version.

As this PR fixes a Microsoft-introduced issue following a change of recommendation regarding how Application Insights should be declared on infrastructure, I would expect a more straightforward road to a merge, especially as code owners validated the content already.
I must admit that the contribution experience is rather frustrating, and not in line with how I undestand the spitit of contribute.md, with 2 and a half month of bumping sprint numbers, patch versions, and integrating master changes.

If not being part of microsoft is what makes it impossible to have the build pipelines pass, then is there a way to have someone from Microsoft (you?) create another PR with the same content to make this PR mergeable ?

Thanks for the input on this matter,

@FinVamp1 FinVamp1 requested a review from manolerazvan July 25, 2024 15:53
@FinVamp1
Copy link
Contributor

@Greybird I've merged your changes into the Functions Apps V2 task as part of this PR for other work. #20191

@v-schhabra and @manolerazvan can you help Arnaud get the rest of his changes in? This is an important community contribution I think that will help as indicated above.

@v-schhabra
Copy link
Contributor

Hi @v-schhabra , I rebased on master (again), and bumped the version.

As this PR fixes a Microsoft-introduced issue following a change of recommendation regarding how Application Insights should be declared on infrastructure, I would expect a more straightforward road to a merge, especially as code owners validated the content already. I must admit that the contribution experience is rather frustrating, and not in line with how I undestand the spitit of contribute.md, with 2 and a half month of bumping sprint numbers, patch versions, and integrating master changes.

If not being part of microsoft is what makes it impossible to have the build pipelines pass, then is there a way to have someone from Microsoft (you?) create another PR with the same content to make this PR mergeable ?

Thanks for the input on this matter,

Apologies for replying late.
Recently I have some high priority items in my queue once I have some bandwidth will create another PR by having these changes.
Will test the tasks and merge it then.
Thanks for the contribution and patience.

Copy link
Contributor

@manolerazvan manolerazvan left a comment

Choose a reason for hiding this comment

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

can we ensure unit tests are covering both the old and the new scenarios ? especially different formats of APPLICATIONINSIGHTS_CONNECTION_STRING ?

@v-schhabra
Copy link
Contributor

can we ensure unit tests are covering both the old and the new scenarios ? especially different formats of APPLICATIONINSIGHTS_CONNECTION_STRING ?

Sure, will check Razvan.

@Greybird Greybird force-pushed the feature/app-insights-connection-string branch from ec70e29 to e2caaec Compare August 17, 2024 07:35
@Greybird
Copy link
Author

Greybird commented Aug 17, 2024

Hi @v-schhabra , any news ?

I rebased on master, and updated versions again.
I removed AzureFunctionAppV1 from the commit as AzureFunctionAppV2 was already updated thanks to @FinVamp1.

This leaves:

  • AzureFunctionAppContainerV1
  • AzureRmWebAppDeploymentV3
  • AzureRmWebAppDeploymentV4
  • AzureWebAppContainerV1
  • AzureWebAppV1

to update.

@v-schhabra
Copy link
Contributor

Hi @Greybird
I did the changes on my end for the tasks owned by our team. Will test the changes and create the PR soon.

@Greybird
Copy link
Author

Great news, thanks for your work on the subject!

@manolerazvan
Copy link
Contributor

@dannysongg @jvano these leaves us with the following

AzureFunctionAppContainerV1
AzureRmWebAppDeploymentV3
AzureRmWebAppDeploymentV4

Are you able to test the changes and merge them ?

@dannysongg dannysongg enabled auto-merge (squash) August 28, 2024 17:59
@dannysongg dannysongg disabled auto-merge August 28, 2024 18:00
@dannysongg
Copy link

@Greybird I'll be updating AzureRmWebAppDeploymentV3 and AzureRmWebAppDeploymentV4 on the WebApp side.
@FinVamp1 do you own AzureFunctionAppContainerV1?

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

Successfully merging this pull request may close these issues.

6 participants