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

pkg/asset: Switch from github.com -> gopkg.in for survey #370

Merged
merged 3 commits into from
Sep 29, 2018

Conversation

wking
Copy link
Member

@wking wking commented Sep 28, 2018

This is the recommended import URI. And survey's internal imports use the gopkg.in form, so we're already vendoring it; this change will let us drop the redundant github.com copies.

The explicit package name is not strictly necessary, but I like to set it when the final segment of the import URL does not match the package name declared within the imported package.

The formatting change unwinds ff9e547 (#342) for glide.yaml, but it doesn't seem to be worth fighting Glide on this front (I generated the glide.yaml changes using the glide command, see the commit message for details).

/assign @crawford

This is the recommended import URI [1].  And survey's internal imports
use the gopkg.in form, so we're already vendoring it; this change will
let us drop the redundant github.com copies.

The explicit package name is not strictly necessary, but I like to set
it when the final segment of the import URL does not match the package
name declared within the imported package.

[1]: https://github.com/AlecAivazis/survey/tree/v1.6.2#versioning
Generated with:

  $ glide remove github.com/AlecAivazis/survey
  $ glide get --strip-vendor gopkg.in/AlecAivazis/survey
  [INFO]Preparing to install 1 package.
  [INFO]Attempting to get package gopkg.in/AlecAivazis/survey.v1
  [INFO]--> Gathering release information for gopkg.in/AlecAivazis/survey.v1
  [INFO]The package gopkg.in/AlecAivazis/survey.v1 appears to have Semantic Version releases (http://semver.org).
  [INFO]The latest release is v1.6.2. You are currently not using a release. Would you like
  [INFO]to use this release? Yes (Y) or No (N)
  y
  [INFO]The package gopkg.in/AlecAivazis/survey.v1 appears to use semantic versions (http://semver.org).
  [INFO]Would you like to track the latest minor or patch releases (major.minor.patch)?
  [INFO]The choices are:
  [INFO] - Tracking minor version releases would use '>= 1.6.2, < 2.0.0' ('^1.6.2')
  [INFO] - Tracking patch version releases would use '>= 1.6.2, < 1.7.0' ('~1.6.2')
  [INFO] - Skip using ranges
  [INFO]For more information on Glide versions and ranges see https://glide.sh/docs/versions
  [INFO]Minor (M), Patch (P), or Skip Ranges (S)?
  m
  [INFO]--> Adding gopkg.in/AlecAivazis/survey.v1 to your configuration with the version ^1.6.2
  ...
  $ glide-vc --use-lock-file --no-tests --only-code
  $ git checkout HEAD -- vendor/github.com/shurcooL/httpfs

using:

  $ glide --version
  glide version 0.13.2-dev
  $ (cd $GOPATH/src/github.com/Masterminds/glide && git describe)
  v0.13.1-7-g3e13fd1
  $ (cd $GOPATH/src/github.com/sgotti/glide-vc && git describe)
  v0.1.0-2-g6ddf6ee

The httpfs works around our busted vfsutil vendor, see
a8cce08 (vendor: Add shurcooL/httpfs/vfsutil, 2018-09-26, openshift#340).

The formatting change unwinds ff9e547 (*: format all yaml files,
2018-09-27, openshift#342), but it doesn't seem to be worth fighting Glide on
this front.
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 28, 2018
Temporarily make the script a no-op while we work out whether we want
to keep this.  It's currently complaining about the YAML output from
Glide in the previous commit [1]:

  ./glide.yaml
    1:1       warning  missing document start "---"  (document-start)
    3:1       error    wrong indentation: expected 2 but found 0  (indentation)
    5:1       error    wrong indentation: expected 2 but found 0  (indentation)
    38:1      error    wrong indentation: expected 2 but found 0  (indentation)

Dropping the script entirely would break CI [2].  Alex is ok dropping
yamllint entirely, but I'm half-interested in keeping it around in
case we decide to move any static YAML assets
(e.g. pkg/asset/manifests/content/tectonic/rbac/role-user.go) over
into data/data.

[1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_installer/370/pull-ci-openshift-installer-yaml-lint/636/build-log.txt
[2]: https://github.com/openshift/release/blob/d7ea5b36da63140fbb99c293aadde3bb279a24f9/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml#L354
@wking
Copy link
Member Author

wking commented Sep 28, 2018

I've pushed 1010077 -> 8ff1cee to duck the YAML-lint issues. More on the duck in 8ff1cee. I'll work up a PR with the "move the static YAML assets into data/data/ approach so folks can see what that would look like.

@crawford
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crawford, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wking
Copy link
Member Author

wking commented Sep 29, 2018

/hold

I'm going to get this in via #379, and don't want Tide getting confused about the stacked branches.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 29, 2018
@openshift-merge-robot openshift-merge-robot merged commit 8ff1cee into openshift:master Sep 29, 2018
@wking wking deleted the gopkg-survey branch September 29, 2018 08:23
wking added a commit to wking/openshift-release that referenced this pull request Oct 22, 2018
We gutted the test back in openshift/installer@8ff1cee1
(hack/yaml-lint: No-op this script, 2018-09-28,
openshift/installer#370).  I'd left the job here in case we wanted to
re-enable later, but with [1] rejected, I don't see that happening.

[1]: openshift/installer#510
wking added a commit to wking/openshift-installer that referenced this pull request Nov 8, 2018
This reverts commit 8ff1cee
(2018-09-28, openshift#370).

We moved from Glide to dep in 1f45543 (vendor: switch from glide to
dep, 2018-09-28, openshift#380), so we no longer need to worry about yamllint
vs. Glide.yaml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants