Skip to content

Use standard_types in templates (allow ipaddress, dns, uri, email in template).#1993

Merged
geeknoid merged 3 commits intoistio:masterfrom
guptasu:useStdTypes2
Dec 6, 2017
Merged

Use standard_types in templates (allow ipaddress, dns, uri, email in template).#1993
geeknoid merged 3 commits intoistio:masterfrom
guptasu:useStdTypes2

Conversation

@guptasu
Copy link
Copy Markdown
Contributor

@guptasu guptasu commented Dec 6, 2017

What this PR does / why we need it:

This PR contains following changes.

Other Changes

  • Remove the original hack that was using []byte for IP_ADDRESS
  • stop supporting google.protobuf.Timestamp and google.protobuf.Duration in all existing Templates.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

none

@istio-testing
Copy link
Copy Markdown
Collaborator

@guptasu: Adding do-not-merge/release-note-label-needed because the release note process has not been followed.

Details

One of the following labels is required "release-note", "release-note-action-required", or "release-note-none".
Please see: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed.

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.

@guptasu guptasu changed the title Use standard types in templates. Use template/standard_types in templates (Allow IpAddress, DNS, Uri, Email in template). Dec 6, 2017
@guptasu guptasu changed the title Use template/standard_types in templates (Allow IpAddress, DNS, Uri, Email in template). Use standard_types in templates (Allow IpAddress, DNS, Uri, Email in template). Dec 6, 2017
@guptasu guptasu changed the title Use standard_types in templates (Allow IpAddress, DNS, Uri, Email in template). Use standard_types in templates (Allow ipaddress, dns, uri, email in template). Dec 6, 2017
@guptasu guptasu changed the title Use standard_types in templates (Allow ipaddress, dns, uri, email in template). Use standard_types in templates (allow ipaddress, dns, uri, email in template). Dec 6, 2017
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 6, 2017

Codecov Report

Merging #1993 into master will decrease coverage by 0.26%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1993      +/-   ##
==========================================
- Coverage   79.78%   79.51%   -0.27%     
==========================================
  Files          71       66       -5     
  Lines        6758     6303     -455     
==========================================
- Hits         5392     5012     -380     
+ Misses       1089     1045      -44     
+ Partials      277      246      -31
Flag Coverage Δ
#broker 46.09% <ø> (-1.18%) ⬇️
#pilot 80.57% <ø> (-0.2%) ⬇️
#security 92.03% <ø> (ø) ⬆️
Impacted Files Coverage Δ
broker/pkg/version/version.go
pilot/platform/kube/inject/inject.go
pilot/platform/kube/inject/configmap.go
pilot/platform/kube/inject/http.go
pilot/platform/kube/inject/initializer.go
pilot/platform/kube/admit/admit.go 55.3% <0%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af9cf39...dd24e15. Read the comment docs.

Copy link
Copy Markdown
Contributor

@geeknoid geeknoid left a comment

Choose a reason for hiding this comment

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

We probably should update the template dev guide along with this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use url.URL?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, we should do this but it needs work on the evaluator. For now I have marked the corresponding types inside mixer/v1/template/standard_types.proto as DO NOT USE. I will leave the rest of the code as is so that we have the tests and everything ready to be used once the evaluator code is ready.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, we should do this but it needs work on the evaluator. For now I have marked the corresponding types inside mixer/v1/template/standard_types.proto as DO NOT USE. I will leave the rest of the code as is so that we have the tests and everything ready to be used once the evaluator code is ready.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use mail.Address?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, we should do this but it needs work on the evaluator. For now I have marked the corresponding types inside mixer/v1/template/standard_types.proto as DO NOT USE. I will leave the rest of the code as is so that we have the tests and everything ready to be used once the evaluator code is ready.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, we should do this but it needs work on the evaluator. For now I have marked the corresponding types inside mixer/v1/template/standard_types.proto as DO NOT USE. I will leave the rest of the code as is so that we have the tests and everything ready to be used once the evaluator code is ready.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should make this a valid address so validations will succeed here (if we use actual type mail.Address

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will leave this as is since we are not using the mail.Address. And as soon as we use mail.Address, this test should fail.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly, this should be a valid URL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will leave this as is since we are not using the url.URL. And as soon as we use url.URL, this test should fail.

Copy link
Copy Markdown
Contributor

@geeknoid geeknoid left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@istio-merge-robot
Copy link
Copy Markdown

/lgtm cancel //PR changed after LGTM, removing LGTM. @geeknoid @guptasu

Copy link
Copy Markdown
Contributor Author

@guptasu guptasu left a comment

Choose a reason for hiding this comment

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

@geeknoid PTAL at the changes to the template.md.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, we should do this but it needs work on the evaluator. For now I have marked the corresponding types inside mixer/v1/template/standard_types.proto as DO NOT USE. I will leave the rest of the code as is so that we have the tests and everything ready to be used once the evaluator code is ready.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed offline, we should do this but it needs work on the evaluator. For now I have marked the corresponding types inside mixer/v1/template/standard_types.proto as DO NOT USE. I will leave the rest of the code as is so that we have the tests and everything ready to be used once the evaluator code is ready.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will leave this as is since we are not using the mail.Address. And as soon as we use mail.Address, this test should fail.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will leave this as is since we are not using the url.URL. And as soon as we use url.URL, this test should fail.

@geeknoid
Copy link
Copy Markdown
Contributor

geeknoid commented Dec 6, 2017

/lgtm
/approve

@istio-merge-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: geeknoid

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

Details 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

@istio-merge-robot
Copy link
Copy Markdown

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

@istio-merge-robot
Copy link
Copy Markdown

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

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.

5 participants