question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`format: arm-id` metadata getting lost during processing pipeline

See original GitHub issue

Before filling a bug

  • have you checked the faq for known issues.
  • have you checked existing issues

Describe the bug

Using @autorest/core version 3.9.1 and @autorest/modelerfour version 4.24.1, the string format of arm-id and the x-ms-arm-id-details extensions seem to be getting inconsistently dropped somewhere along the processing pipeline. When processing the ManagedClusterAgentPoolProfileProperties shape in version 2022-06-01 of the containerservice resource manager spec in a custom plugin at the end of the processing pipeline, I expected to see vnetSubnetID, podSubnetID, nodePublicIPPrefixID, proximityPlacementGroupID, and hostGroupID use an instance of ArmIdSchema as their schemas, but the lattermost used an instance of Aspect (with the x-ms-arm-id-details extension data present in the schema) and the rest used an instance of StringSchema (with no format or x-ms-arm-id-details extension data present in the schema).

Using @autorest/core version 3.9.1 and @autorest/modelerfour version 4.24.1, plugins downstream on the processing pipeline from modelerfour do not see instances of ArmIdSchema used. Instead, the schema will be an instance of Aspect with a type of arm-id.

Autorest command used:

autorest --use=@autorest/modelerfour --use=/home/jeskew/Workspaces/bicep-types-az/src/autorest.bicep --bicep --output-folder=/tmp/_bcp_1660150886081/containerservice --level=verbose --multiapi --title=none --skip-semantics-validation /home/jeskew/Workspaces/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md --level=verbose --bicep.debugger

Additional context I put a few debugger statements in the modelerfour extension and saw that hostGroupID’s was being correctly represented as an instance of ArmIdSchema, so the conversion to Aspect is probably happening either where data is being returned to autorest from the plugin process or where data is being provided to my custom plugin. The plugin uses autorest version 3.6.2, @autorest/codemodel version 4.19.1, and @autorest/extension-base version 3.5.0.

All other properties of ManagedClusterAgentPoolProfileProperties that I was expecting to be ARM IDs had already shed their format and x-ms-arm-id-details schema properties, presumably in a plugin placed before modelerfour in the processing pipeline.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jeskewcommented, Aug 12, 2022

Everything is working correctly using the version of modelerfour from the linked PR. Thanks for the quick work on this!

0reactions
timotheeguerincommented, Aug 12, 2022

Thanks for the investigation @jeskew, I have a PR with the fix here, could you just confirm this works fine following the instruction here https://github.com/Azure/autorest/pull/4616. Guessing it must as this is the change you probably did locally to make it work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build large-scale data copy pipelines with metadata-driven ...
Create metadata-driven copy jobs from copy data tool · Select Metadata-driven copy task in copy data tool. · Input the connection of your...
Read more >
CellProfiler from command line does not form image sets ...
If I run CellProfiler from the GUI (tested on Ubuntu and Windows) then there is no issue. However, I cannot run this same...
Read more >
How to Use Metadata to Future-Proof Your Data Stack
These tools are excellent for building pipelines that are ingesting and transforming data, but they end up creating metadata silos. These silos ...
Read more >
Data wrangling
Data wrangling, sometimes referred to as data munging, is the process of transforming and mapping data from one "raw" data form into another...
Read more >
Standard Sequencing Service Data File Formats
Backward compatibility of any new file format is not guaranteed. Complete Genomics data is for Research Use Only and not for use in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found