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

work around Azure JS SDK limitation with node.js workers #969

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Dec 27, 2024


  • Refactoring Logging Levels

    • Replaced logVerbose with more specific logging levels (logVerbose, logError) for better control over log visibility.
  • Code Cleanup

    • Cleaned up redundant code and improved readability.
    • Removed unused comments and commented-out lines.
  • Runtime Environment Handling

    • Added platform-specific environment handling in worker.ts to resolve an issue with SystemRoot.
  • URL Conversion for Windows

    • Converted cli paths to URLs on Windows platforms using pathToFileURL to ensure compatibility.
  • Configuration Options Update

    • Ensured that configuration options are correctly handled and updated when running scripts.

These changes focus on improving the code's maintainability, reducing redundancy, and enhancing platform-specific handling.

AI-generated content by pr-describe may be incorrect

@pelikhan pelikhan requested a review from Copilot December 27, 2024 12:01

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (1)

packages/cli/src/azuretoken.ts:32

  • The function 'createAzureToken' is no longer exported. This could break other parts of the codebase that rely on this function. Ensure that this change is intentional and that no other parts of the codebase are affected.
async function createAzureToken(
Copy link

LGTM 🚀

The changes in azuretoken.ts and worker.ts appear to be related to token management and some platform-specific fixes. Here's a summary:

  1. azuretoken.ts:

    • The import statement for logging functions has been updated from logVerbose to logError and logVerbose.
    • A line of code that logs the expiration time of the token has been removed and added back with better context.
  2. worker.ts:

    • Added a platform-specific condition for Windows to set process.env.SystemRoot.

Both changes seem functional and improve the clarity and maintainability of the code. There are no functional issues or concerns noted in the provided changes.

AI-generated content by pr-review may be incorrect

@pelikhan pelikhan merged commit fdae125 into main Dec 27, 2024
14 checks passed
@pelikhan pelikhan deleted the azurecliworker branch December 27, 2024 12:17
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.

1 participant