Add dist-git style tasks namespace check
ClosedPublic

Authored by mkrizek on Apr 13 2016, 1:23 PM.

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mkrizek retitled this revision from to Add dist-git style tasks namespace check.Apr 13 2016, 1:23 PM
mkrizek updated this object.
mkrizek edited the test plan for this revision. (Show Details)
mkrizek added reviewers: tflink, kparal.
kparal requested changes to this revision.Apr 14 2016, 11:50 AM
kparal added inline comments.
libtaskotron/directives/resultsdb_directive.py
32–35

This should be amended to cover additional cases when we raise this.

258–261

The process() method is getting really long, could this be separated into a standalone method?

263

Please add a debug printout before breaking.

281

Please add a debug printout before breaking.

290

This should be pkg.%s. (a dot in the end), right?

293

Can you add explanation where is the KeyError coming from?

294–296

I don't like this very much. We're claiming here it is about namespace permissions, even when the original message is "Could not find task's git" (a completely different problem), or when the task tries to use a namespace we don't know about (also a different problem). Could we throw those errors right away, with specific error messages?

testing/test_resultsdb_directive.py
339

Why is this needed, isn't self.ref_arg_data regenerated before each test method start?

This revision now requires changes to proceed.Apr 14 2016, 11:50 AM
mkrizek updated this revision to Diff 2077.Apr 15 2016, 7:24 AM

Namespace existance check and refactoring

kparal accepted this revision.Apr 15 2016, 10:31 AM

Thanks, looks good.

testing/test_resultsdb_directive.py
339

I still think you can save this one line from all your tests.

This revision is now accepted and ready to land.Apr 15 2016, 10:31 AM
This revision was automatically updated to reflect the committed changes.