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

Fix depsolving empty recipes #291

Merged
merged 3 commits into from
Dec 12, 2017
Merged

Fix depsolving empty recipes #291

merged 3 commits into from
Dec 12, 2017

Conversation

martinpitt
Copy link
Contributor

  • Fix projects_depsolve() to not consider a successful empty response
    (rc == 0) as an error.
  • Fix recipe_from_dict() to default modules and packages to empty lists
    instead of None, to avoid a Python-ism in the API for consumers and
    stay compatible to the bdcs API.

Fixes #290

This PR also fixes two unrelated test failures and a tiny log error copy-pasta error, while I was at it.

When running tests somewhere else than Central Time, `test_api_time()`
fails like

    AssertionError: '1985-10-27T02:00:00' != '1985-10-26T21:00:00'

`test_yaps_to_project_info()` fails in a similar way.

Pin the time zone to UTC for this test and adjust timestamps to UTC.
 - Fix `projects_depsolve()` to not consider a successful empty response
   (rc == 0) as an error.
 - Fix recipe_from_dict() to default modules and packages to empty lists
   instead of `None`, to avoid a Python-ism in the API for consumers and
   stay compatible to the bdcs API.

Fixes #290
Copy link
Member

@atodorov atodorov left a comment

Choose a reason for hiding this comment

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

LGTM

@martinpitt
Copy link
Contributor Author

Hmm, do the tests run in CI somewhere? Other PRs do seem to do that.

@atodorov
Copy link
Member

Hmm, do the tests run in CI somewhere?

not for the lorax-composer branch ATM. It's on my todo but I'd like to get done with configuring CI for the other repos as well.

@martinpitt
Copy link
Contributor Author

Ah, ok. I ran all the tests locally, and aside from #292 (which is unaffected by this PR and unrelated) they all pass now.

Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

Looks Good, Thanks!

@bcl bcl merged commit c58b367 into weldr:lorax-composer Dec 12, 2017
@martinpitt martinpitt deleted the lorax-composer branch December 14, 2017 21:44
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.

3 participants