Skip to content
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

stop #1656

Merged
merged 7 commits into from May 13, 2015
Merged

stop #1656

merged 7 commits into from May 13, 2015

Conversation

yetanotherion
Copy link
Contributor

following the POC from tardyp's commit.

@yetanotherion yetanotherion force-pushed the master branch 4 times, most recently from d050db1 to fd625ce Compare May 11, 2015 13:59
@yetanotherion yetanotherion changed the title WIP: stop POC stop May 11, 2015
try:
b = yield self.master.db.buildrequests.claimBuildRequests(brids=[brid])
except AlreadyClaimedError:
builds = yield self.master.data.get(("buildrequests", brid, "builds"))
Copy link
Member

Choose a reason for hiding this comment

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

There is a race condition here. The buildrequest might be claimed, but the build are not yet created. The claiming master has to find a slave, substanciate it, etc before creating the build.
As ee don't have a proper solution for this race condition, I would at least create a comment here stating this, and create a trac to follow up on this problem

@yetanotherion
Copy link
Contributor Author

@tardyp @djmitche comments addressed



def triggeredBuildIsNotCreated():
c = {}
Copy link
Member

Choose a reason for hiding this comment

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

you can still factorize those two functions. only 2 lines are different if I read correctly

@yetanotherion yetanotherion force-pushed the master branch 2 times, most recently from 905049a to 8023b9c Compare May 12, 2015 08:01
@yetanotherion
Copy link
Contributor Author

@tardyp coment about test_stop_trigger factorization addressed

@tardyp
Copy link
Member

tardyp commented May 12, 2015

👍 Please avoid rebase for the review comments addressing. This helps the review (can only review new patches)

@yetanotherion
Copy link
Contributor Author

sorry for that, but a unit test failed in remove result. I preferred to integrate the fix in the related commit (2f4f24e) rather than modifying the git history (which seems like polluting it to me)

@yetanotherion
Copy link
Contributor Author

(fyi tests are now ok in my station, let's see what travis says)

Ion Alberdi added 5 commits May 12, 2015 14:17
build.py uses two attributes for the same goal:
results and result.

This commit gets rid of result, to be compatible with
the overall nomenclature of the code.

Note that as the result contains one verdict only,
it seems a wider results -> result renaming
would be appropriate.

Change-Id: I463cd4467d093df939e8274a3101373d0169b8b5
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
To be able to observe the events related to one build
(by means of the method startConsuming)
before the 'new' build event is triggered, this commit
splits the addBuild method in two.

Change-Id: I6d4ddbcbd02fab6233a3affee7dfba5bf7b22ec0
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
this commit implements the stop of builds
with associated integration tests.

Change-Id: Ie81306b32cacebb1e277b8d3bf785a7ae2ccf2de
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
As the stop/cancel works by means of messages sent
to the bus and associated callbacks, this commit
removes the deprecated way of doing so.

Change-Id: Id3480ef1b782762d9967b2a542db87b9e5f96cec
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
This commit adds a stop button in top
of the build page.

Change-Id: I9d95f5cab2e54f250dd0fa1dcb25da8a2ff269c8
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
@yetanotherion
Copy link
Contributor Author

Some errors/timeout seem to have made the build fail
(apt-get install nodejs and git fetch on github)
https://travis-ci.org/buildbot/buildbot/jobs/62226384
https://travis-ci.org/buildbot/buildbot/jobs/62226388

The others are ok, does someone have rights to rebuild these two only ?

Stop trigger integration tests, revelead a race
condition. When updateSummary is called
before the step is started, self.stepid is not set
and thus the setStepStateString(self.stepid, ...)
call failed.

This commit fixes that issue.

Change-Id: I725b9a4f791b1063bdac892be9dca27471f4b452
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
@yetanotherion
Copy link
Contributor Author

👍 from travis

# Don't call the data API here, as the buildrequests might have been
# taken by another master. We just send the stop message and forget about those.
for b in builds:
self.master.mq.produce(("control", "builds", str(b['buildid']), "stop"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need to set a default value while looking up for "reason" key into kwargs as you did below?

ie. dict(reason=kwargs.get('reason', 'no reason'))

@yetanotherion
Copy link
Contributor Author

@nam4dev comments addressed

@@ -533,22 +538,21 @@ def buildFinished(self, text, results):
state.

It takes two arguments which describe the overall build status:
text, results. 'results' is one of SUCCESS, WARNINGS, or FAILURE.
text, results. 'results' is one of the possible results (see buildbot.status.results).

Choose a reason for hiding this comment

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

Somewhere in the code you use @type and @param to describe params, why not doing it here also?
With sphynx, you should be also able to do :ref:buildbot.status.results

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 actually don't know which doc generation tool is used in buildbot, (and thus
the @type @param are more aimed at being understood by the programmer reading the code rather than a programmer reading the doc). What do you think @tardyp @djmitche @sa2ajj ?

@bastien31
Copy link

👍

this commit implements two improvements on how
the reason sent via the cancel message is computed:
- setup a default value 'no reason'
- the message is computed once for all messages
  to be sent.

Change-Id: I4738e3f16606890a17c24f2d4eb5dad8b3d16597
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
@tardyp
Copy link
Member

tardyp commented May 13, 2015

👍

sa2ajj pushed a commit that referenced this pull request May 13, 2015
@sa2ajj sa2ajj merged commit 052fda5 into buildbot:master May 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants