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

Improve our Instance Metadata coverage in Azure. #49237

Merged
merged 1 commit into from
Aug 3, 2017

Conversation

brendandburns
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 19, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Jul 19, 2017
@@ -821,6 +821,13 @@ func TestSplitProviderID(t *testing.T) {
}
}

func TestMetadataURLGeneration(t *testing.T) {
fullPath := MakeMetadataURL("some/path")
if fullPath != "http://169.254.169.254/metadata/some/path" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use constant metaURL here to check the full path so that it will not break the test if the const is changed?

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 20, 2017
@colemickens
Copy link
Contributor

/lgtm

but you're failing a go-lint test

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 20, 2017
@k8s-github-robot k8s-github-robot added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Jul 20, 2017
@@ -61,28 +54,43 @@ type Subnet struct {
Prefix string `json:"prefix"`
}

type InstanceMetadata struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: comment describing exportable struct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

baseURL string
}

func NewInstanceMetadata() *InstanceMetadata {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

if err != nil {
return "", err
}
return string(data), err
}

func queryMetadataBytes(path, format string) ([]byte, error) {
func (i *InstanceMetadata) queryMetadataBytes(path, format string) ([]byte, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

One more comment nit, just to be consistent (cf: the // makeMetadataURL comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you are asking for here... Can you clarify? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, just requesting a simple method comment.

// QueryMetadataJSON queries the metadata server and populates the passed in object
func QueryMetadataJSON(path string, obj interface{}) error {
data, err := queryMetadataBytes(path, "json")
func (i *InstanceMetadata) QueryMetadataJSON(path string, obj interface{}) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be nice to incorporate into the name of this method the idea that it mutates the passed in object interface. QueryMetadataJSONUnmarshall? (ugh)

Copy link
Contributor

Choose a reason for hiding this comment

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

or UnmarshalMetadataJSON

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@jackfrancis
Copy link
Contributor

recommend that we withdraw PR #49081 and use this one instead

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 26, 2017
@brendandburns
Copy link
Contributor Author

Comments mostly addressed, one that I'm not sure what the request is...

@jackfrancis
Copy link
Contributor

/lgtm

@k8s-ci-robot
Copy link
Contributor

@jackfrancis: changing LGTM is restricted to assignees, and only kubernetes org members may be assigned issues.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: brendandburns, colemickens, jackfrancis

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@brendandburns brendandburns added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jul 27, 2017
@brendandburns brendandburns added this to the v1.8 milestone Jul 27, 2017
@brendandburns brendandburns removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Jul 27, 2017
@brendandburns
Copy link
Contributor Author

@jdumars @jackfrancis can you propose membership for yourself in the kubernetes org?

@brendandburns
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-etcd3

@brendandburns
Copy link
Contributor Author

(self lgtm/approve given lgtm from @jackfrancis above)

@brendandburns brendandburns added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 27, 2017
@k8s-github-robot k8s-github-robot added kind/new-api size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 31, 2017
@k8s-ci-robot k8s-ci-robot removed the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 31, 2017
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 31, 2017
@jdumars
Copy link
Member

jdumars commented Jul 31, 2017

/retest

@jdumars
Copy link
Member

jdumars commented Jul 31, 2017

/sig azure

@jdumars
Copy link
Member

jdumars commented Jul 31, 2017

@brendandburns can you take a look at this PR?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 31, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed kind/new-api size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 31, 2017
@brendandburns
Copy link
Contributor Author

@jdumars fixed, I don't know what happened there. git is still a foreign language for me sometimes :)

@brendandburns
Copy link
Contributor Author

/test pull-kubernetes-e2e-kops-aws
/test pull-kubernetes-e2e-gce-etcd3

@brendandburns
Copy link
Contributor Author

/test pull-kubernetes-e2e-kops-aws

2 similar comments
@brendandburns
Copy link
Contributor Author

/test pull-kubernetes-e2e-kops-aws

@jdumars
Copy link
Member

jdumars commented Aug 1, 2017

/test pull-kubernetes-e2e-kops-aws

@jdumars
Copy link
Member

jdumars commented Aug 1, 2017

/test pull-kubernetes-e2e-kops-aws
once more with feeling!

@brendandburns
Copy link
Contributor Author

/test pull-kubernetes-e2e-kops-aws

@brendandburns brendandburns added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 2, 2017
@brendandburns
Copy link
Contributor Author

self lgtm since this was only a rebase.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-ci-robot
Copy link
Contributor

@brendandburns: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce-etcd3 e03f02a link /test pull-kubernetes-e2e-gce-etcd3

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 49237, 49656, 49980, 49841, 49899)

@k8s-github-robot k8s-github-robot merged commit 82b95c0 into kubernetes:master Aug 3, 2017
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants