Skip to content

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

Merged
merged 2 commits into from
Oct 30, 2017

Conversation

adbridge
Copy link
Contributor

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.

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.
Copy link
Contributor

@0xc0170 0xc0170 left a 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).

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 18, 2017

cc @theotherjimmy

@adbridge
Copy link
Contributor Author

Could have been 3 commits but the changes are so small it didn't seem worth it....

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 19, 2017

@theotherjimmy please review

Copy link
Contributor

@theotherjimmy theotherjimmy left a 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",
Copy link
Contributor

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.

Copy link
Contributor Author

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.....

Copy link
Contributor

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:
Copy link
Contributor

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.)

Copy link
Contributor Author

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...

Copy link
Contributor

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.

Copy link
Contributor Author

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 !

sys.exit(1)

# Create the full repository filter component
org_str = ''.join(['repo:', 'ARMmbed/', example['name']])
Copy link
Contributor

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.

Copy link
Contributor Author

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...

@adbridge
Copy link
Contributor Author

@theotherjimmy please re-review

Copy link
Contributor

@theotherjimmy theotherjimmy left a 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))
Copy link
Contributor

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?

Copy link
Contributor Author

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...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 26, 2017

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 26, 2017

Build : SUCCESS

Build number : 347
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5332/

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci
Copy link

mbed-ci commented Oct 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants