microsoft / microsoft/AzureTRE

Error sending create / update request Unevaluated properties are not allowed ('your_property_name' was unexpected) occurs when updatable is false

Open
#4,728 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api documentation has workaround ui
Dominant language
Python
Stars
235
Forks
192
Avg merge
1d 23h
Merged PRs (30d)
13

Description

Describe the bug

When trying to upgrade a resource that defines a property value from a parent in the upgrade step of the pipeline an error is generated because the properties are stripped out by the UI and not sent.
This causes the pipeline to get stuck and needs deleting from the cosmos DB

Error sending create / update request
Unevaluated properties are not allowed ('dc_ip_addresses' was unexpected)

https://github.com/microsoft/AzureTRE/blob/a46578b996b2d9302eb018af74c31ec3b2186e88/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx#L103

Image
Steps to reproduce
  1. Add a property that doesn't have updateable: true
  2. Update that property in the Upgrade pipeline
    "log_analytics_workspace_name": {
      "$id": "#/properties/log_analytics_workspace_name",
      "type": "string",
      "title": "Log Analytics Workspace Name"
    }

    "upgrade": [
           {
        "stepId": "main",
        "properties": [
          {
            "name": "log_analytics_workspace_name",
            "type": "string",
            "value": "{{ resource.parent.properties.log_analytics_workspace_name }}"
          }
        ]
      },
  1. Try to update the service and see that the value is not sent which generates and error on the API and the resource is now infinitely updating and needs to be deleted from the cosmosDB.
Update

The solution is to set "updateable": true
I think the error is correct, trying to update a property that is not updatable however the real issue is that it causes the job to get stuck in the cosmosDB in the awaiting_update stage

There is also a need to document the use of the pipeline properties and the use of resource.parent.properties etc

Azure TRE release version (e.g. v0.14.0 or main):
main
Deployed Azure TRE components - click the (i) in the UI:
UI Version:
0.8.16
API Version:
0.25.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ui/app/src/components/shared/create-update-resource/ResourceForm.tsx around line 103 and reproduce the upgrade pipeline with a non-updatable property inherited from resource.parent.properties. Trace the resulting API error and awaiting_update state, including the Cosmos DB record. Done means the failure no longer leaves the resource stuck, with the pipeline-property behavior documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
backend, cloud, database, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.