Skip to content

Conversation

@johnma14
Copy link
Contributor

@johnma14 johnma14 commented Feb 9, 2021

This PR tries to automate the microservices tutorial in the example section of the Istio docs.
It consists of 2 parts:

  • update to the istio.io test framework to use the same test framework across multiple tests (parent-child relationship)
  • added automated tests for the microservices tutorial which has the parent-child relationship
    • Throughout all the tutorials, updated the commands to create resources in the tutorial namespace
    • In setup-kubernetes-cluster, updated the roles and rolebindings for istio-system and tutorial namespaces.
      The original RBAC permissions are very broad and allow all verbs on all resources for several Kubernetes API Groups.
      In this PR, we have added a finer grained Kubernetes RBAC Role for read-write access to a participant's namespace.
      Also added a ClusterRole and ClusterRoleBindingto enable manual sidecar injection for pods in thetutorial namespace [add-istio-Enable Istio on productpage`].

Updates to the test framework to support this scenario includes added 3 new optional tags to the TestCase object -

  • @parent: this is the parent id that will be used to identify the parent test case
  • @child: this indicates that the test case if the child of a parent id. The parent id set using the @parent tag will
    be used here.
  • @order: this tag will be used to specify the order in which the child tests need to be run

The child tests will be run as a subtest of the parent test.

Fixes #8429, #7989

[ ] Configuration Infrastructure
[X ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

@johnma14 johnma14 requested review from a team as code owners February 9, 2021 20:12
@istio-policy-bot
Copy link

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-policy-bot
Copy link

😊 Welcome! This is either your first contribution to the Istio documentation repo, or
it's been awhile since you've been here. A few things you should know:

  • You can learn about how we write and maintain documentation, about our style guidelines,
    and about all the available web site features by visiting Contributing to the Docs.

  • In the next few minutes, an automatic preview of your change will be
    built as a full copy of the istio.io website. You can find this preview by clicking on
    the Details link next to the deploy/netlify entry in the Status section of this
    page.

  • We care about quality, so we've put in place a number of checks to ensure our documentation
    is top notch. We do spell checking, we sanitize the markdown, we ensure all hyperlinks point
    to valid location, and more. If your PR doesn't pass one of these checks, you'll see a red X in the
    status section of the page. Click on the Details link to get a list of the problems with your PR.
    Fix those problems and push an update to your PR. This will automatically rerun the tests and
    hopefully this time everything will be perfect.

  • Once your changes are accepted and merged into the repository, they will initially show up
    on https://preliminary.istio.io. The changes will be published to https://istio.io
    the next time we do a major release (which typically happens every 3 months or so).

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Feb 9, 2021
@istio-testing istio-testing added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 9, 2021
@craigbox
Copy link
Contributor

Mariam, please have a look at the test/lint output so we can move this forward. Thank you!

@istio-policy-bot istio-policy-bot added the lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. label Jun 19, 2021
@johnma14 johnma14 reopened this Jun 19, 2021
@johnma14 johnma14 force-pushed the WI8429 branch 7 times, most recently from 6289619 to c68121d Compare June 23, 2021 22:45
@johnma14 johnma14 force-pushed the WI8429 branch 5 times, most recently from 8b91c41 to a9a2974 Compare July 12, 2021 15:04
@johnma14 johnma14 force-pushed the WI8429 branch 3 times, most recently from 8b4ab12 to 1bb66f1 Compare July 16, 2021 19:48
This PR tries to automate the microservices tutorial in the example section of the Istio docs.
It consists of 2 parts:
- update to the istio.io test framework to use the same test framework across multiple tests (parent-child relationship)
- added automated tests for the microservices tutorial which has the parent-child relationship
  - Throughout all the tutorials, updated the commands to create resources in the `tutorial` namespace
  - In `setup-kubernetes-cluster`, updated the roles and rolebindings for `istio-system` and `tutorial` namespaces.
    The original RBAC permissions are very broad and allow all verbs on all resources for several Kubernetes API Groups.
    In this PR, we have added a finer grained Kubernetes RBAC Role for read-write access to a participant's namespace.
    Also added a `ClusterRole and `ClusterRoleBinding` to enable manual sidecar injection for pods in the `tutorial`
    namespace [add-istio - `Enable Istio on productpage`].

Updates to the test framework to support this scenario includes added 3 new optional tags to the TestCase object -
- @parent: this is the parent id that will be used to identify the parent test case
- @child: this indicates that the test case if the child of a parent id. The parent id set using the @parent tag will
          be used here.
- @order: this tag will be used to specify the order in which the child tests need to be run

The child tests will be run as a subtest of the parent test.

Fixes istio#8429, istio#7989
@johnma14
Copy link
Contributor Author

@craigbox whenever you have some time to take a look at this one. Appreciate it.

@istio-testing
Copy link
Contributor

@johnma14: PR needs rebase.

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.

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Oct 3, 2022
@istio-testing
Copy link
Contributor

@johnma14: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
doc.test.profile_default_istio.io e441e39 link true /test doc.test.profile_default
doc.test.multicluster_istio.io e441e39 link true /test doc.test.multicluster
doc.test.profile_none_istio.io e441e39 link true /test doc.test.profile_none
doc.test.profile_demo_istio.io e441e39 link true /test doc.test.profile_demo
doc.test.profile_minimal_istio.io e441e39 link true /test doc.test.profile_minimal
doc.test.profile-demo_istio.io e441e39 link true /test doc.test.profile-demo
doc.test.profile-default_istio.io e441e39 link true /test doc.test.profile-default
doc.test.profile-none_istio.io e441e39 link true /test doc.test.profile-none
doc.test.profile-minimal_istio.io e441e39 link true /test doc.test.profile-minimal

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.

Copy link
Contributor

@craigbox craigbox left a comment

Choose a reason for hiding this comment

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

If this is still relevant I'd love to get it merged. @johnma14 ?

@linsun
Copy link
Member

linsun commented Nov 17, 2023

@johnma14 no longer works on Istio any more. @ericvn thoughts? Would you and someone willing to step up to get this to finish line? My thoughts are we are probably okay without the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. kind/docs lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. needs-rebase Indicates a PR needs to be rebased before being merged 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.

Add support to test framework to use the same test environment across to test multiple docs

5 participants