internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: Azure/azure-cli-extensions

Issue:
Transition to GA: costmanagement
Command module `costmanagement` has been released for a long time and is using stable sdk version `2019-11-01`.

Please check [Extension GA guidelines](https://github.com/Azure/azure-cli/blob/dev/doc/onboarding_guide.md#preview-extension-to-ga-extension) and remove `experimental` tag if necessary.




Discussion:
costmanagement 

Resolving patch:
diff --git a/src/costmanagement/azext_costmanagement/manual/commands.py b/src/costmanagement/azext_costmanagement/manual/commands.py
--- a/src/costmanagement/azext_costmanagement/manual/commands.py
+++ b/src/costmanagement/azext_costmanagement/manual/commands.py
@@ -13,8 +13,7 @@ def load_command_table(self, _):
         operations_tmpl='azext_costmanagement.vendored_sdks.costmanagement.operations.'
                         '_query_operations#QueryOperations.{}',
         client_factory=cf_query)
-    with self.command_group('costmanagement', costmanagement_query,
-                            client_factory=cf_query, is_experimental=True) as g:
+    with self.command_group('costmanagement', costmanagement_query, client_factory=cf_query) as g:
         g.custom_command('query', 'costmanagement_query')
 
     from azext_costmanagement.generated._client_factory import cf_export
@@ -22,8 +21,7 @@ def load_command_table(self, _):
         operations_tmpl='azext_costmanagement.vendored_sdks.costmanagement.operations._export_operations#ExportOperatio'
         'ns.{}',
         client_factory=cf_export)
-    with self.command_group('costmanagement export', costmanagement_export, client_factory=cf_export,
-                            is_experimental=True) as g:
+    with self.command_group('costmanagement export', costmanagement_export, client_factory=cf_export) as g:
         g.custom_command('list', 'costmanagement_export_list')
         g.custom_show_command('show', 'costmanagement_export_show')
         g.custom_command('create', 'costmanagement_export_create')
diff --git a/src/costmanagement/setup.py b/src/costmanagement/setup.py
--- a/src/costmanagement/setup.py
+++ b/src/costmanagement/setup.py
@@ -11,7 +11,7 @@
 
 # TODO: Confirm this is the right version number you want and it matches your
 # HISTORY.rst entry.
-VERSION = '0.1.0'
+VERSION = '0.1.1'
 
 # The full list of classifiers is available at
 # https://pypi.python.org/pypi?%3Aaction=list_classifiers


Test patch:
Repository: Azure/azure-cli-extensions

Issue:
Transition to GA: databox
Command module `databox` has been released for a long time and is using stable sdk version `2019-09-01`.

Please check [Extension GA guidelines](https://github.com/Azure/azure-cli/blob/dev/doc/onboarding_guide.md#preview-extension-to-ga-extension) and remove `experimental` tag if necessary.


Discussion:
databox 

Resolving patch:
diff --git a/src/databox/azext_databox/commands.py b/src/databox/azext_databox/commands.py
--- a/src/databox/azext_databox/commands.py
+++ b/src/databox/azext_databox/commands.py
@@ -17,7 +17,7 @@ def load_command_table(self, _):
     databox_jobs = CliCommandType(
         operations_tmpl='azext_databox.vendored_sdks.databox.operations._jobs_operations#JobsOperations.{}',
         client_factory=cf_jobs)
-    with self.command_group('databox job', databox_jobs, client_factory=cf_jobs, is_experimental=True) as g:
+    with self.command_group('databox job', databox_jobs, client_factory=cf_jobs) as g:
         g.custom_command('create', 'create_databox_job', validator=validate_create_input_parameters)
         g.custom_command('update', 'update_databox_job')
         g.custom_command('delete', 'delete_databox_job', confirmation=True)
diff --git a/src/databox/setup.py b/src/databox/setup.py
--- a/src/databox/setup.py
+++ b/src/databox/setup.py
@@ -16,7 +16,7 @@
 
 # TODO: Confirm this is the right version number you want and it matches your
 # HISTORY.rst entry.
-VERSION = '0.1.0'
+VERSION = '0.1.1'
 
 # The full list of classifiers is available at
 # https://pypi.python.org/pypi?%3Aaction=list_classifiers


Test patch:
Repository: Azure/azure-cli-extensions

Issue:
Transition to GA: storagesync
Command module `storagesync` has been released for a long time and is using stable sdk version `2019-06-01`.

Please check [Extension GA guidelines](https://github.com/Azure/azure-cli/blob/dev/doc/onboarding_guide.md#preview-extension-to-ga-extension) and remove `experimental` tag if necessary.



Discussion:
storagesync 

Resolving patch:
diff --git a/src/storagesync/azext_storagesync/commands.py b/src/storagesync/azext_storagesync/commands.py
--- a/src/storagesync/azext_storagesync/commands.py
+++ b/src/storagesync/azext_storagesync/commands.py
@@ -64,6 +64,3 @@ def load_command_table(self, _):
         g.custom_show_command('show', 'get_storagesync_registered_server')
         g.custom_command('list', 'list_storagesync_registered_server')
         g.wait_command('wait')
-
-    with self.command_group('storagesync', is_experimental=True) as g:
-        pass
diff --git a/src/storagesync/setup.py b/src/storagesync/setup.py
--- a/src/storagesync/setup.py
+++ b/src/storagesync/setup.py
@@ -16,7 +16,7 @@
 
 # TODO: Confirm this is the right version number you want and it matches your
 # HISTORY.rst entry.
-VERSION = '0.1.0'
+VERSION = '0.1.1'
 
 # The full list of classifiers is available at
 # https://pypi.python.org/pypi?%3Aaction=list_classifiers


Test patch:
Repository: Azure/azure-cli-extensions

Issue:
[containerapp] az containerapp update with --max-replicas 0 returns no error
`az containerapp update -n ContainerAppName -g ResourceGroup --min-replicas 0 --max-replicas 0` finishes without throwing any error, however scaling configuration is not updated as max replicas cannot be zero.

```
$ az version
{
  "azure-cli": "2.37.0",
  "azure-cli-core": "2.37.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "containerapp": "0.3.5",
  }
}
```


Discussion:
containerapp
@snobu Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.

Resolving patch:
diff --git a/src/containerapp/azext_containerapp/custom.py b/src/containerapp/azext_containerapp/custom.py
--- a/src/containerapp/azext_containerapp/custom.py
+++ b/src/containerapp/azext_containerapp/custom.py
@@ -504,6 +504,11 @@ def update_containerapp_logic(cmd,
                               from_revision=None):
     _validate_subscription_registered(cmd, CONTAINER_APPS_RP)
 
+    # Validate that max_replicas is set to 0-30
+    if max_replicas is not None:
+        if max_replicas < 1 or max_replicas > 30:
+            raise ArgumentUsageError('--max-replicas must be in the range [1,30]')
+
     if yaml:
         if image or min_replicas or max_replicas or\
            set_env_vars or remove_env_vars or replace_env_vars or remove_all_env_vars or cpu or memory or\


Test patch:
Repository: Azure/azure-cli-extensions

Issue:
front-door extension can not find existing front door resources
### Related command
<!--- Please provide the related command with az {command} if you can, so that we can quickly route to the related team for help. --->
```
az network front-door list
basically all front-door commands
```
### Extension name (the extension in question)
front-door

### Description of issue (in as much detail as possible)
I was trying to use AZ cli to execute some command against existing front-door, but found out that front-door extension is unable to locate any FD resources by name or resource id for any command I tried. I was getting (ResourceNotFound) error. Then found out that executing "az network front-door list" returns empty array. I tried multiple subscriptions containing front door resource, access with different accounts, using AZ cli both on windows and linux, and the result was the same. 

Update: I am using latest version 1.0.16 of the front-door extension.




Discussion:
Thank you for your feedback.  This has been routed to the support team for assistance.
route to CXP team
@petersladek Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.
@petersladek While I ran the command `az network front-door list` it was able to list the frontdoor resource details. I am using the front-door extension version 1.0.16 with AzCLi 2.38 version.

Could you please follow the below action plan and check if that helps ?

**Plan 1:** 
Run the below commands in order and check if that helps:
- az login
- az account set --subscription "XXXXXXX-XXXX-XXXX-XXXX"
- az network front-door list

**Plan 2:**
If you still face the same issue, please run the command with `--debug `switch and share the debug output here. Awaiting your reply.

That is not working for me. However I found out the root cause. `az network front-door` can only be used on front door **classic**. For standard/premium you have to use new command [`az afd`](https://docs.microsoft.com/en-us/cli/azure/afd?view=azure-cli-latest) that I found only by accident when browsing available `az` commands. The problem is that if you google "az cli front door" all links refer to [`az network front-door`](https://docs.microsoft.com/en-us/cli/azure/network/front-door?view=azure-cli-latest) and in documentation it is not mentioned that it only works for front door classic. It should really be added, I wasted several hours because of that.

Resolving patch:
diff --git a/src/front-door/azext_front_door/_help.py b/src/front-door/azext_front_door/_help.py
--- a/src/front-door/azext_front_door/_help.py
+++ b/src/front-door/azext_front_door/_help.py
@@ -10,7 +10,7 @@
 # region FrontDoor
 helps['network front-door'] = """
     type: group
-    short-summary: Manage Front Doors.
+    short-summary: Manage Classical Azure Front Doors. For managing Azure Front Door Standard/Premium, please refer https://docs.microsoft.com/en-us/cli/azure/afd?view=azure-cli-latest.
 """
 
 helps['network front-door create'] = """


Test patch:
Repository: Azure/azure-cli-extensions

Issue:
[Reservations] Creating Reservations commands in azue-cli-extensions
---

This checklist is used to make sure that common guidelines for a pull request are followed.

### Related command
<!--- Please provide the related command with az {command} if you can, so that we can quickly route to the related person to review. --->


### General Guidelines

- [x] Have you run `azdev style <YOUR_EXT>` locally? (`pip install azdev` required)
- [x] Have you run `python scripts/ci/test_index.py -q` locally?

For new extensions:

- [ ] My extension description/summary conforms to the [Extension Summary Guidelines](https://github.com/Azure/azure-cli/blob/dev/doc/extensions/extension_summary_guidelines.md).


### About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.  
Once your pull request is merged into main branch, a new pull request will be created to update `src/index.json` automatically.  
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify `src/index.json`. 



Discussion:
Reservations
/azp run
<samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>
<samp>
Commenter does not have sufficient privileges for PR 5408 in repo Azure/azure-cli-extensions<br>

</samp>
/azp run
<samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>
/azp run
<samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>
/azp run
<samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>

Resolving patch:
diff --git a/src/reservation/azext_reservation/vendored_sdks/__init__.py b/src/reservation/azext_reservation/vendored_sdks/__init__.py
new file mode 100644
--- /dev/null
+++ b/src/reservation/azext_reservation/vendored_sdks/__init__.py
@@ -0,0 +1,5 @@
+# -----------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+# -----------------------------------------------------------------------------
diff --git a/src/reservation/setup.py b/src/reservation/setup.py
--- a/src/reservation/setup.py
+++ b/src/reservation/setup.py
@@ -11,7 +11,7 @@
 
 # TODO: Confirm this is the right version number you want and it matches your
 # HISTORY.rst entry.
-VERSION = '0.1.0'
+VERSION = '0.1.1'
 
 # The full list of classifiers is available at
 # https://pypi.python.org/pypi?%3Aaction=list_classifiers


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
Negative solar values of UY
Negative values of solar prevent the value from being inserted in the database.

```python
{'source': 'ute.com.uy', 'production': {'wind': 118.8, 'unknown': 0.0, 'biomass': 119.5, 'solar': -0.1, 'hydro': 695.2}, 'countryCode': 'UY', 'datetime': datetime.datetime(2017, 6, 24, 6, 24, tzinfo=tzfile('/usr/share/zoneinfo/America/Montevideo'))}
{'sortedCountryCodes': 'BR->UY', 'netFlow': -0.0, 'source': 'ute.com.uy', 'datetime': datetime.datetime(2017, 6, 24, 6, 24, tzinfo=tzfile('/usr/share/zoneinfo/America/Montevideo'))}
```
Negative solar values of UY
Negative values of solar prevent the value from being inserted in the database.

```python
{'source': 'ute.com.uy', 'production': {'wind': 118.8, 'unknown': 0.0, 'biomass': 119.5, 'solar': -0.1, 'hydro': 695.2}, 'countryCode': 'UY', 'datetime': datetime.datetime(2017, 6, 24, 6, 24, tzinfo=tzfile('/usr/share/zoneinfo/America/Montevideo'))}
{'sortedCountryCodes': 'BR->UY', 'netFlow': -0.0, 'source': 'ute.com.uy', 'datetime': datetime.datetime(2017, 6, 24, 6, 24, tzinfo=tzfile('/usr/share/zoneinfo/America/Montevideo'))}
```


Discussion:

Resolving patch:
diff --git a/parsers/UY.py b/parsers/UY.py
--- a/parsers/UY.py
+++ b/parsers/UY.py
@@ -47,7 +47,18 @@ def parse_page(session):
         value = tds[1].find_all('b')
         # Go back one level up if the b tag is not there
         if not len(value): value = tds[1].find_all('font')
-        v = float(value[0].contents[0].replace(',', '.'))
+        v_str = value[0].contents[0]
+        if v_str.find(',') > -1 and v_str.find('.') > -1:
+            # there can be values like "1.012,5"
+            v_str = v_str.replace('.', '')
+            v_str = v_str.replace(',', '.')
+        else:
+            # just replace decimal separator, like "125,2"
+            v_str = v_str.replace(',', '.')
+        v = float(v_str)
+
+        # solar reports -0.1 at night, make it at least 0
+        v = max(v, 0)
 
         obj[k] = v
 


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
Hydro missing from DO
![opbeat com-tomorrow-electricity-map-backend-errors-329-](https://user-images.githubusercontent.com/1655848/29333158-11e0dec0-8203-11e7-9e38-a24c2d74e42f.png)



Discussion:

Resolving patch:
diff --git a/parsers/DO.py b/parsers/DO.py
--- a/parsers/DO.py
+++ b/parsers/DO.py
@@ -140,7 +140,7 @@ def data_formatter(data):
     ufthermal = data[find_thermal_index+3:find_totals_index-59]
     total_data = data[find_totals_index:find_totals_end]
 
-    #Remove all comapany names.
+    #Remove all company names.
     for val in ufthermal:
         if ':' in val:
             i = ufthermal.index(val)
@@ -301,11 +301,11 @@ def fetch_production(country_code = 'DO', session = None):
               'biomass': hour.get('biomass', 0.0),
               'coal': hour.get('coal', 0.0),
               'gas': hour.get('gas', 0.0),
-              'hydro': hour['hydro'],
+              'hydro': hour.get('hydro', 0.0),
               'nuclear': 0.0,
               'oil': hour.get('oil', 0.0),
               'solar': None,
-              'wind': hour['wind'],
+              'wind': hour.get('wind', 0.0),
               'geothermal': 0.0,
               'unknown': hour.get('unknown', 0.0)
           },


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
HTTPError 500  at https://api.electricitymap.org/v3/state
When I run the app in local, I am getting below error, any idea?

main.js:261 Error Caught! Error: HTTPError 500  at https://api.electricitymap.org/v3/state: {"status":"error","message":"Unknown error occured. Please contact admin@electricitymap.org"}

https://api.electricitymap.org/v3/state

{"status":"error","message":"Unknown error occured. Please contact admin@electricitymap.org"}



Discussion:

Resolving patch:
diff --git a/parsers/CR.py b/parsers/CR.py
--- a/parsers/CR.py
+++ b/parsers/CR.py
@@ -98,6 +98,12 @@
     u'Volcán': 'hydro',
 }
 
+unmapped = set()
+
+def unknown_plants():
+    for plant in unmapped:
+        print '{} is not mapped to generation type!'.format(plant)
+
 
 def empty_record(country_code):
     return {
@@ -133,10 +139,14 @@ def df_to_data(country_code, day, df):
         data.append(empty_record(country_code))
         for index, value in df[column].iteritems():
             current = len(data) - 1
-            source = POWER_PLANTS[index]
+            source = POWER_PLANTS.get(index)
+            if source == None:
+                source = 'unknown'
+                unmapped.add(index)
             data[current]['datetime'] = day.replace(hours=hours).datetime
             data[current]['production'][source] += max(0.0, value)
         hours += 1
+
     return data
 
 
@@ -165,8 +175,12 @@ def fetch_production(country_code='CR', session=None):
     response = r.post(url, cookies={}, data=data)
     df_today = pd.read_html(response.text, skiprows=1, index_col=0)[0]
 
-    return df_to_data(country_code, yesterday, df_yesterday) + \
-           df_to_data(country_code, today, df_today)
+    ydata = df_to_data(country_code, yesterday, df_yesterday)
+    tdata = df_to_data(country_code, today, df_today)
+    production = ydata + tdata
+    unknown_plants()
+
+    return production
 
 
 def fetch_exchange(country_code1='CR', country_code2='NI', session=None):


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
PTR1TG23 is missing from the AR plant mapping



Discussion:

Resolving patch:
diff --git a/parsers/AR.py b/parsers/AR.py
--- a/parsers/AR.py
+++ b/parsers/AR.py
@@ -342,6 +342,9 @@
                      'PPNOTG02': 'gas',
                      'PROCDI01': 'oil',
                      'PROVTV01': 'gas',
+                     'PTR1TG23': 'gas',
+                     'PTR1TG24': 'gas',
+                     'PTR1TG25': 'gas',
                      'PUPITV01': 'gas',
                        'PVIEHI': 'hydro',
                      'PZUEDI01': 'oil',


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
AU-VIC <-> AU-NSW interconnector error
We seem to have swapped the interconnector in the parser, cf this tweet: https://twitter.com/HMike01/status/924871957320933377

@jarek or @systemcatch  would you have time to debug the parser? I think it might apply to the other interconnectors too..

![image](https://user-images.githubusercontent.com/1655848/32156846-fdcf0bc8-bd3f-11e7-839b-1a242eb01122.png)



Discussion:
At a glance it seems that NSW-VIC, NSW- QLD and SA-VIC are going in the wrong direction.  TAS-VIC is correct.  @jarek how's it look to you?
The page in the screenshot is http://aemo.com.au/Electricity/National-Electricity-Market-NEM/Data-dashboard#nem-dispatch-overview

SA-VIC and TAS-VIC seem fine to me. NSW-VIC and NSW-QLD seem wrong.
While we're on the subject of AU interconnectors, I don't really understand the import/export limits. Right now most of them have exportlimit positive and importlimit negative, except for:

* TAS-VIC {"name":"T-V-MNSP1", "value":60.00000, "exportlimit":279.90000, "importlimit":60.00469} 
* one of NSW-QLD {"name":"N-Q-MNSP1", "value":-57.20000, "exportlimit":-57.20000, "importlimit":-136.70000}

Is this something to do with how the grid operates? TAS *cannot* export less than 60 MW to VIC or Bad Things will happen to The Grid? But I guess that's not used in the calculations, so less imporant...

Resolving patch:
diff --git a/parsers/AU.py b/parsers/AU.py
--- a/parsers/AU.py
+++ b/parsers/AU.py
@@ -419,16 +419,21 @@ def fetch_production(country_code=None, session=None):
     return data
 
 
+# It appears that the interconnectors are named according to positive flow.
+# That is, NSW1-QLD1 reports positive values when there is flow from NSW to QLD,
+# and negative values when flow is from QLD to NSW.
+# To verify, compare with flows shown on
+# http://aemo.com.au/Electricity/National-Electricity-Market-NEM/Data-dashboard#nem-dispatch-overview
 EXCHANGE_MAPPING_DICTIONARY = {
     'AUS-NSW->AUS-QLD': {
         'region_id': 'QLD1',
         'interconnector_names': ['N-Q-MNSP1', 'NSW1-QLD1'],
-        'directions': [-1, -1]
+        'directions': [1, 1]
     },
     'AUS-NSW->AUS-VIC': {
         'region_id': 'NSW1',
         'interconnector_names': ['VIC1-NSW1'],
-        'directions': [1]
+        'directions': [-1]
     },
     'AUS-SA->AUS-VIC': {
         'region_id': 'VIC1',


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
LCAMTG01 is missing from the AR plant mapping!



Discussion:

Resolving patch:
diff --git a/parsers/AR.py b/parsers/AR.py
--- a/parsers/AR.py
+++ b/parsers/AR.py
@@ -191,6 +191,7 @@
                      'LBANTG21': 'gas',
                      'LBANTG22': 'gas',
                      'LBLADI01': 'oil',
+                     'LCAMTG01': 'gas',
                        'LDCUHI': 'hydro',
                      'LDCUTG22': 'gas',
                      'LDCUTG23': 'gas',
@@ -247,7 +248,8 @@
                      'MATETG10': 'gas',
                      'MATHTG01': 'gas',
                      'MATHTG02': 'gas',
-                     'MDAJTG17': 'gas',
+                     'MDAJTG15': 'oil',
+                     'MDAJTG17': 'oil',
                      'MDPATG12': 'gas',
                      'MDPATG13': 'gas',
                      'MDPATG19': 'gas',


Test patch:
Repository: electricitymaps/electricitymaps-contrib

Issue:
Missing AR plant mappins
```
feeder_1  | VOBLTV01 is missing from the AR plant mapping!
feeder_1  | LCA2TG01 is missing from the AR plant mapping!
```


Discussion:

Resolving patch:
diff --git a/parsers/AR.py b/parsers/AR.py
--- a/parsers/AR.py
+++ b/parsers/AR.py
@@ -68,6 +68,12 @@
                      'BARDDI01': 'oil',
                      'BBLATV29': 'gas',
                      'BBLATV30': 'gas',
+                     'BBLMDI01': 'oil',
+                     'BBLMDI02': 'oil',
+                     'BBLMDI03': 'oil',
+                     'BBLMDI04': 'oil',
+                     'BBLMDI05': 'oil',
+                     'BBLMDI06': 'oil',
                      'BERIDI01': 'gas',
                      'BLOPTG01': 'gas',
                      'BRAGTG01': 'gas',
@@ -157,7 +163,9 @@
                      'EMBANUCL': 'nuclear',
                        'ESCAHI': 'hydro',
                      'ESQDDI01': 'oil',
+                     'EZEITG01': 'gas',
                      'EZEITG02': 'gas',
+                     'EZEITG03': 'gas',
                      'FORDDI01': 'oil',
                      'FORDDI02': 'oil',
                      'FRIATG01': 'gas',
@@ -182,6 +190,7 @@
                      'HUEMDI01': 'gas',
                      'INDETG01': 'gas',
                      'INDETG02': 'gas',
+                     'INDETG03': 'gas',
                      'INTADI01': 'oil',
                      'ISBATV01': 'gas',
                      'ISVEDI01': 'oil',
@@ -191,6 +200,7 @@
                      'LBANTG21': 'gas',
                      'LBANTG22': 'gas',
                      'LBLADI01': 'oil',
+                     'LCA2TG01': 'gas',
                      'LCAMTG01': 'gas',
                        'LDCUHI': 'hydro',
                      'LDCUTG22': 'gas',
@@ -440,6 +450,7 @@
                      'VMARTG03': 'gas',
                      'VOBLTG01': 'gas',
                      'VOBLTG02': 'gas',
+                     'VOBLTV01': 'gas',
                      'VTUDDI01': 'oil',
                      'VTUEDI01': 'oil',
                        'YACYHI': 'hydro',


Test patch: