Skip to content

Try cloning the env object since it has properties that may not get shallow copied#1359

Open
nturinski wants to merge 2 commits intomainfrom
nat/structuredClone
Open

Try cloning the env object since it has properties that may not get shallow copied#1359
nturinski wants to merge 2 commits intomainfrom
nat/structuredClone

Conversation

@nturinski
Copy link
Member

The tests were failing because the azureClient needed to access environment.resourceManagerEndpointUrl. So I deep copied the environment object into the context.

@nturinski nturinski requested a review from a team as a code owner February 7, 2026 02:05
Copilot AI review requested due to automatic review settings February 7, 2026 02:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes failing nightly CRUD tests by ensuring the Azure subscription environment object is cloned into the test action context so required environment properties (e.g., resourceManagerEndpointUrl) are present when used by Azure client code.

Changes:

  • Replace shallow spread-based context construction with an explicit environment: structuredClone(...) assignment.
  • Ensure the environment object is copied in a way that preserves properties that may not survive shallow copying.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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