-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: capture exceptions caused by unregistered provider and auto-register it #3045
Conversation
"Run 'az provider register -n {}' to register the namespace first".format( | ||
match.group(1))) | ||
elif pertinent_text_feature in msg: | ||
reg = r".*{}\s+([^\s]+)\s+".format(pertinent_text_feature) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature
is much less used and sniffing the text is a bit tricky i like to avoid, so i am removing the polish rather focus on the provider error, which end customers do hit.
Codecov Report
@@ Coverage Diff @@
## master #3045 +/- ##
==========================================
+ Coverage 70.42% 70.47% +0.05%
==========================================
Files 360 360
Lines 23185 23204 +19
Branches 3555 3558 +3
==========================================
+ Hits 16329 16354 +25
+ Misses 5822 5817 -5
+ Partials 1034 1033 -1
Continue to review full report at Codecov.
|
from azure.cli.core.commands import _check_rp_not_registered_err | ||
|
||
|
||
# pylint: disable=line-too-long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only line requires this is line 34, can you put it there? Additionally, that line itself can be broken into multiple lines.
Fix CI first, of course. |
src/azure-cli-core/HISTORY.rst
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
Release History | |||
=============== | |||
2.0.4 (Unreleased) | |||
*core: capture exceptions caused by unregistered provider and auto-register it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can you add a heading ^^^^^
? Also, need a space after *
.
time.sleep(10) | ||
rp_info = rcf.providers.get(rp) | ||
if rp_info.registration_state == 'Registered': | ||
logger.warning("Registeration succeeded.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo 'Registeration'
00a9be0
to
5141351
Compare
Ping @derekbekoe @vivsriaus |
General Guidelines
Command Guidelines
(see Authoring Command Modules)