Skip to content

[AutoPR track2_azure-mgmt-rdbms] [ContainerService] [postgresql] Change track2 to python - #1

Closed
openapi-sdkautomation[bot] wants to merge 1 commit into
mainfrom
sdkAuto/18617/track2_azure-mgmt-rdbms
Closed

[AutoPR track2_azure-mgmt-rdbms] [ContainerService] [postgresql] Change track2 to python#1
openapi-sdkautomation[bot] wants to merge 1 commit into
mainfrom
sdkAuto/18617/track2_azure-mgmt-rdbms

Conversation

@openapi-sdkautomation

Copy link
Copy Markdown

Create to sync Azure/azure-rest-api-specs#18617

You can install the use using pip install of the artificats.

@azure-sdk
azure-sdk force-pushed the sdkAuto/18617/track2_azure-mgmt-rdbms branch 7 times, most recently from 0168f81 to 7b7640c Compare April 8, 2022 08:58
Merge 516f99c1713156f39f9d91d67ca625189ad8702a into e6960fdb7e58aa8bcca0b208a881452e2e6c55c8
@azure-sdk
azure-sdk force-pushed the sdkAuto/18617/track2_azure-mgmt-rdbms branch from 7b7640c to c7bbfea Compare April 8, 2022 09:43
@azure-sdk azure-sdk closed this Apr 11, 2022
@azure-sdk
azure-sdk deleted the sdkAuto/18617/track2_azure-mgmt-rdbms branch April 11, 2022 05:57
azure-sdk pushed a commit that referenced this pull request Apr 24, 2022
[Hub Generated] Review request for Microsoft.Devices to add version stable/2022-02-05 (Azure#17948)

* Adds base for updating Microsoft.Devices from version stable/2021-10-15 to version 2022-02-05

* Updates readme

* Updates API version in new specs and examples

* definition changes

* example changes

* no comments

* swagger modelval fix #1

* general validation fix #1

* revert readonly change (breaking change)

* added locatio pvtEp example

* misplaced location param

* location in PvtEConn response

* header addition

* headers #2

* example change with location sans spec

* header nesting change

* header under headers

* header example
azure-sdk pushed a commit that referenced this pull request Jun 22, 2022
azure-sdk pushed a commit that referenced this pull request Feb 7, 2023
* Adding in some functionality to use different clouds

This support is needed for the air gapped environments.  There are three
ways to add a new cloud environment.  These were all taken from examples
in the v1 sdk.

1) The SDK will look for a default configuration file and try to find
   cloud environments in there.
2) If you set an environment variable called ARM_METADATA_URL, it will
   look there for cloud configurations.  If you do not set this, it will
   use a default URL in the _azure_environments.py file to find them.
3) The SDK exposes two new functions, add_cloud which will add the new
   configuration to the configuration file mentioned in #1, and
   update_cloud which will update the added configuration.

* Removing some of the functionality, only ARM check remains

* Adding unit test for new environments functionality

* fixed tests with mock

* removed print statement

* removed commented code

* removed print statements (oops)

* fixed tests and removed comments

* Fixing a testing bug

* Fixing a misspelled word

* Changing how we reach out to ARM, als fixing some pylint

* Fixing more lint errors

* Fixing more lint errors

* updated code per suggestions in PR

* fixed typo in warning

* added registry_endpoint to metadata url, also added tests for making sure all endpointurls are registered

* updated how the registry discovery endpoint is created. Uses a default region but region can be updated with environment variable

* fixed linting errors

* moved discovery url logic around to make sure it's not overwriting public regions

* Fixing small pylint errors

* Moving over to using HttpPipeline instead of requests

* fixed up based on comments in the PR

* fixed broken unit tests and mocked correctly

* Fixing pylint issues

---------

Co-authored-by: Ronald Shaw <ronaldshaw@microsoft.com>
azure-sdk pushed a commit that referenced this pull request Mar 22, 2023
[Hub Generated] Review request for Microsoft.Help to add version preview/2023-01-01-preview (Azure#23056)

* Generate new Service for help

* init commit microsoft.help-2023-01-01-preview

* Updating swagger documentation #1

* Updating swagger documentation #2

* Adding suppressions for Help 2023-01-01-preview api

* Adding suppressions for Help 2023-01-01-preview api #2

* removed unnecessary files

* update examples
azure-sdk pushed a commit that referenced this pull request Jul 13, 2023
* Update with new swagger

* changes for job matching modes

* remove generated models
- all models have been handcoded

* fix lint errors #1

* fix lint errors 2

* update swagger to point to main specs repo
azure-sdk-automation Bot pushed a commit that referenced this pull request Apr 22, 2026
…ure#46444)

* [evaluation] Fix multi-turn red team attacks broken by PyRIT 0.11

PyRIT 0.11 introduced two bugs in RedTeamingAttack that prevent multi-turn
red team attacks from running:

1. RedTeamingAttack._setup_async() adds prepended_conversation messages to
   the adversarial chat memory BEFORE calling set_system_prompt(). The
   default PromptChatTarget.set_system_prompt then raises
   `RuntimeError: Conversation already exists, system prompt needs to be
   set at the beginning`. CrescendoAttack avoids this by embedding context
   in the system prompt template, so it does not regress.

2. RedTeamingAttack._generate_next_prompt_async returns
   context.next_message directly without calling .duplicate_message().
   PromptNormalizer.send_prompt_async then deepcopies the message but
   preserves the MessagePiece id, so re-inserting the same id into memory
   raises sqlite3.IntegrityError: UNIQUE constraint failed:
   PromptMemoryEntries.id. Notably PromptSendingAttack._build_message
   uses .duplicate_message() — the intended pattern.

Together these two bugs cause Foundry red team eval runs with the
MultiTurn (and other RedTeamingAttack-based) strategies to silently fail
and surface only baseline results in the UI.

Workaround applied at the SDK level to avoid bumping PyRIT:

- Bug #1: instance-scoped patch of set_system_prompt on the adversarial
  chat target. The patched version inserts the system message into memory
  via add_message_to_memory when prior messages exist, instead of raising.
  Scope is limited to the AzureRAIServiceTarget instance created by the
  scan, so no global PyRIT class is mutated.

- Bug #2: module-level monkey-patch of
  RedTeamingAttack._generate_next_prompt_async that wraps the returned
  message in .duplicate_message(). The patch is idempotent and applied
  once at SDK module load.

Verified locally with both a callback target and an Azure OpenAI model
target (gpt-4o-mini): multi-turn attacks now execute the full
conversation loop and produce expected results in
violence_multi_turn_results.jsonl and final_results.json.

Work item: https://msdata.visualstudio.com/Vienna/_workitems/edit/5166253

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update CHANGELOG for multi-turn PyRIT fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Move changelog entry to 1.16.6 and bump version

1.16.5 is already released (2026-04-08). Put this fix under 1.16.6
(Unreleased) to match in-flight version increment PR Azure#46222.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address Copilot review: version-guard PyRIT 0.11 patches and add unit tests

- Add _is_affected_pyrit_version() check; both patches early-return for pyrit
  versions other than 0.11.x so a future fix or signature change isn't masked.
- Add tests/unittests/test_redteam/test_pyrit_workarounds.py covering:
  * patch is applied (marker on RedTeamingAttack._generate_next_prompt_async)
  * patched method calls .duplicate_message() on the returned message
  * None pass-through (no AttributeError)
  * idempotent re-application (no double-wrapping)

The set_system_prompt instance patch remains covered by the local E2E reproductions
(callback target + gpt-4o-mini); unit testing it would require constructing an
AzureRAIServiceTarget with full memory plumbing and offers little value beyond E2E.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Strengthen multi-turn E2E test + re-record on PyRIT 0.11

Previous assertion (len(conversation) >= 2) was too weak to catch the PyRIT 0.11 set_system_prompt bug — any attack silently dropped from attack_details still passed. Now require multi_turn attack present + >= 4 messages per multi-turn conversation.

Re-recorded against patched SDK so playback validates the fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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