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: fix pkg version #17

Merged
merged 2 commits into from Dec 5, 2018

Conversation

s-yoshika
Copy link
Contributor

@s-yoshika s-yoshika commented Dec 4, 2018

sd-step failed with pkg-version option in some cases.

I think the habitat API is something strange.
https://willem.habitat.sh/v1/depot/pkgs/core/node?range=0
https://willem.habitat.sh/v1/depot/pkgs/core/node?range=23

Previously, it may returns total_count which is the number of whole packages,
but now it may be the number of the packages in a page.
And some pages may contains same contents?

This PR fixed to work with the current API behavior for now.
But this fix may be just workaround.

I confirm in local environment.

$ go run ./sd-step.go  exec --pkg-version "~6.11.3" core/node "node -v"
v6.11.5

hab/hab_test.go Outdated
RangeEnd: 0,
TotalCount: 0,
PackageList: []PackageInfo{},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

PackagesInfo's last } indent looks strange.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@yuichi10 yuichi10 left a comment

Choose a reason for hiding this comment

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

lgtm

@d2lam d2lam merged commit a7f0626 into screwdriver-cd:master Dec 5, 2018
@d2lam
Copy link
Member

d2lam commented Dec 5, 2018

Thank you! Please re-enable functional test in API when ready. I disabled it previously: screwdriver-cd/screwdriver#1404

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