Skip to content

Conversation

harshnasitcrest
Copy link
Contributor

@harshnasitcrest harshnasitcrest commented Jun 2, 2025

Added Model Armor Snippets for:

  • Get Project Floor Settings
  • Get Folder Floor Settings
  • Get Organization Floor Settings
  • Update Project Floor Settings
  • Update Folder Floor Settings
  • Update Organization Floor Settings

NOTE: Please set following environment variables required for running tests:
MA_FOLDER_ID: 695279264361
MA_ORG_ID: 951890214235

@harshnasitcrest harshnasitcrest requested review from a team as code owners June 2, 2025 14:46
Copy link

snippet-bot bot commented Jun 2, 2025

Here is the summary of changes.

You are about to add 6 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added api: modelarmor Issues related to the Model Armor API. samples Issues that are directly related to samples. labels Jun 2, 2025
@amanda-tarafa amanda-tarafa assigned purva9413 and unassigned jskeet Jun 4, 2025
@purva9413 purva9413 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 4, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 4, 2025
Anu4396
Anu4396 previously approved these changes Jun 10, 2025
Copy link

@Anu4396 Anu4396 left a comment

Choose a reason for hiding this comment

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

Approved as an SME from the Model Armor team.

@utsav1810 utsav1810 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 3, 2025
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 3, 2025
@utsav1810 utsav1810 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 7, 2025
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 7, 2025
Anu4396
Anu4396 previously approved these changes Jul 8, 2025
…oss folder, organization and project settings
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 24, 2025
@purva9413
Copy link

Necessary permissions on the project have been added which resolved some of the issues. But it is still failing with permission issues on the organization and folder. Please pull in a modelarmor SME to help with this and lmk if we need to add anything to the CI.

@harshnasitcrest
Copy link
Contributor Author

Necessary permissions on the project have been added which resolved some of the issues. But it is still failing with permission issues on the organization and folder. Please pull in a modelarmor SME to help with this and lmk if we need to add anything to the CI.

@purva9413 - I've already assigned the relevant IAM permissions to the org and folder used by tests. Also, all tests are passing on my local.
Screenshot 2025-09-25 at 4 49 43 PM

It seems like there’s something missing on the CI side. Could you please confirm whether the following service account is being utilised for executing the tests? --> kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com

@utsav1810 utsav1810 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 25, 2025
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 25, 2025
@purva9413
Copy link

Not sure if something was done on the backend but the permission issue on the org and folder which I mentioned earlier has gone away? We see genuine test failures on Windows now.

[xUnit.net 00:00:13.81]     ModelArmor.Samples.Tests.UpdateTemplateWithLabelsTests.UpdateTemplateWithLabelsTest [FAIL]
  Failed ModelArmor.Samples.Tests.UpdateTemplateWithLabelsTests.UpdateTemplateWithLabelsTest [241 ms]
  Error Message:
   Grpc.Core.RpcException : Status(StatusCode="InvalidArgument", Detail="The template 'projects/1061780273775/locations/us-central1/templates/test-dotnet-a6a24484' is not conformant with the effective floor setting. Violations: '{
  "raiFilterSettings": {
    "raiFilters": [{
      "filterType": "HATE_SPEECH",
      "confidenceLevel": {
        "floorSettings": "LOW_AND_ABOVE",
        "templateSettings": "HIGH"
      }
    }]
  }
}'")

@harshnasitcrest
Copy link
Contributor Author

harshnasitcrest commented Sep 29, 2025

@purva9413 I debugged and fixed the permission issues for folder and org. Could you add kokoro labels to verify?

@utsav1810 utsav1810 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 30, 2025
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 30, 2025
@harshnasitcrest
Copy link
Contributor Author

@purva9413 All tests are successful now! Are we good to merge this PR?

purva9413
purva9413 previously approved these changes Sep 30, 2025
Anu4396
Anu4396 previously approved these changes Oct 1, 2025
@harshnasitcrest
Copy link
Contributor Author

Thanks for the approvals! Can someone trigger merge on this PR?
@purva9413 / @Anu4396

@harshnasitcrest
Copy link
Contributor Author

@Anu4396 @purva9413 Could you please re-approve and trigger merge on this PR? A merge conflict was detected due to some change committed repo-wise in csproj files (https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/main/modelarmor/api/ModelArmor.Samples.Tests/ModelArmor.Samples.Tests.csproj) 4 hours ago

TIA!

@utsav1810 utsav1810 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Oct 3, 2025
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: modelarmor Issues related to the Model Armor API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants