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

Adding additional command line param of sync-access-token #4199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aneillans
Copy link

@aneillans aneillans commented Nov 21, 2024

Issue describing the changes in this PR

Related to the issue linked below, adds the ability to pass a different access token to be used for the sync triggers call.

partially resolves #4196

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Sorry, something went wrong.

@aneillans aneillans requested a review from a team as a code owner November 21, 2024 20:41
@aishwaryabh aishwaryabh changed the base branch from v4.x to main November 26, 2024 18:48
@liliankasem
Copy link
Member

@soninaren do you mind taking a look at this

@liliankasem liliankasem requested a review from Copilot March 13, 2025 20:24

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new command-line parameter (--sync-access-token) to allow the sync triggers call to use an access token that differs from the normal one. Key changes include updating the sync triggers logic in PublishFunctionAppAction.cs to use the new token if provided and adding the new SyncAccessToken property and parser setup in BaseAzureAction.cs.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Azure.Functions.Cli/Actions/AzureActions/PublishFunctionAppAction.cs Updated the sync triggers method to assign SyncAccessToken from AccessToken if not provided and then use it in the sync call.
src/Azure.Functions.Cli/Actions/AzureActions/BaseAzureAction.cs Added a new SyncAccessToken property and command-line parameter for it.
Comments suppressed due to low confidence (2)

src/Azure.Functions.Cli/Actions/AzureActions/PublishFunctionAppAction.cs:651

  • Consider adding unit tests for the sync triggers functionality to cover cases where 'SyncAccessToken' is provided and when it falls back to using 'AccessToken'.
if (string.IsNullOrEmpty(SyncAccessToken))

src/Azure.Functions.Cli/Actions/AzureActions/BaseAzureAction.cs:43

  • Consider adding unit tests to validate the new '--sync-access-token' command-line parameter, including its default handling when no sync token is explicitly provided.
Parser.Setup<string>("sync-access-token")
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.

Inability to refresh triggers behind authenticated function app post deploy
3 participants