-
Notifications
You must be signed in to change notification settings - Fork 3k
Improve domain handling and status checking of updated examples. #5332
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
Conversation
All the examples cloned from Mercurial should use the new os.mbed.com domain. Thus update corrects that. A new option has been added to the update.py script , -s which shows the status of any PRs raised against the examples that are tagged with the current release label.
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.
This should be 3 commits as the description says (3 items that are not related).
Could have been 3 commits but the changes are so small it didn't seem worth it.... |
@theotherjimmy please review |
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.
Nits!
@@ -102,6 +102,19 @@ | |||
"auto-update" : true | |||
}, | |||
{ | |||
"name": "mbed-cloud-client-example-internal", |
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.
While I'm sure we want to test this, I'm sure they don't want it publicly advertised.
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 client team asked for it to be added.....
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.
Okay!
try: | ||
repo = github.get_repo(repo_name, False) | ||
|
||
except Exception as exc: |
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.
Can you not cache C-c
here? Another way: Could you specify the exact exception, or exception list, that would occur? (I know it can be hard, untracked exceptions have a way of being intractable.)
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.
As far as I know there is no specific documentation on how the pygithub module returns the github exceptions. I've had a lot of issues in the past trying to narrow down a list and TBH in this case if any exception comes back at all then it's basically fatal...
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.
Sounds good. I'm generally trying to promote defensive programming because python's "unchecked exceptions" error handling is beginning to drive me crazy.
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.
I agree, we could definitely do with more defensive programming !
tools/test/examples/update.py
Outdated
sys.exit(1) | ||
|
||
# Create the full repository filter component | ||
org_str = ''.join(['repo:', 'ARMmbed/', example['name']]) |
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.
Why are `'repo:' and 'ARMmbed/' separate strings here? They are just going to be concatenated anyway.
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.
yeah , very minor but I could fix it...
@theotherjimmy please re-review |
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.
One more question.
filt = ' '.join([org_str, 'is:pr', tag]) | ||
merged = False | ||
|
||
issues = github.search_issues(query=(filt)) |
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.
Are the ()
around filt
needed? If so, why?
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.
It's the pygithub syntax for that command...
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.
Thanks!
/morph build |
Build : SUCCESSBuild number : 347 Triggering tests/morph test |
Test : SUCCESSBuild number : 158 |
All the examples cloned from Mercurial should use the new
os.mbed.com domain. Thus update corrects that.
A new option has been added to the update.py script , -s which shows
the status of any PRs raised against the examples that are tagged with
the current release label.
Add mbed-cloud-client-example-internal to examples list.