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

Make logging for creating/deleting AWS resources consistent #3144

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

pydctw
Copy link
Contributor

@pydctw pydctw commented Feb 3, 2022

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Make logging for creating/deleting AWS resources consistent. See #3143 for a detailed description.

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

Special notes for your reviewer:
Added missing logs, formatted some logs and moved unimportant logs to level 2.

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

Release note:

Make logging for AWS resources creation/deletion consistent

Some resources had only delete log while other resources create/delete
logs were missing.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 3, 2022
@pydctw
Copy link
Contributor Author

pydctw commented Feb 3, 2022

/test?

@k8s-ci-robot
Copy link
Contributor

@pydctw: This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-ci-robot
Copy link
Contributor

@pydctw: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

/test?

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-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 3, 2022
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 3, 2022
@pydctw
Copy link
Contributor Author

pydctw commented Feb 3, 2022

/test pull-cluster-api-provider-aws-e2e

@pydctw
Copy link
Contributor Author

pydctw commented Feb 3, 2022

See manager.log for an updated output log.

@sedefsavas
Copy link
Contributor

I think there is a systematic way you have in mind in this PR: logging as info() only at the end of a method and logging v2.info() elsewhere.
Unless we document this logic and agree on what to be consistent about during reviews, we will not have consistency.

Do you want to track this or maybe add documentation as part of this PR?

@Ankitasw
Copy link
Member

Ankitasw commented Feb 4, 2022

This is really good observation, as I have recently got feedback that the logs are inconsistent. As @sedefsavas mentioned, I also think we should have documentation in place so that if we add new services/behavior, then this documentation might help follow consistency.
Also, do we have any guidelines on what to put for v(2) logs and what to put for other levels like ,v(4),v(6) etc?

@pydctw
Copy link
Contributor Author

pydctw commented Feb 4, 2022

I think there is a systematic way you have in mind in this PR: logging as info() only at the end of a method and logging v2.info() elsewhere.

I actually didn't have any systematic way in mind 🙂 What I did was

  • Add a missing creation log at the same log level as the existing deletion log
  • Add a missing creation/deletion or adjust the log level for resources with same level of importance (subnet, sg, and etc)
  • Thought Deleted association between route table and subnet and Detached internet gateway from VPC are not that important for users so moved the log level to V(2).

But 100% agree that it will be great to have a guidance on what log level to use across the repo. Will open an issue for discussion. Thank you for the suggestion, @sedefsavas and @Ankitasw.

@pydctw
Copy link
Contributor Author

pydctw commented Feb 4, 2022

Created an issue for consistent logging as a follow up: #3152

@sedefsavas
Copy link
Contributor

I actually didn't have any systematic way in mind 🙂 What I did was

I looked too hard for seeing consistency then =)

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sedefsavas

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

@k8s-ci-robot k8s-ci-robot 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 Feb 4, 2022
@sedefsavas sedefsavas added this to the v1.3.0 milestone Feb 4, 2022
@k8s-ci-robot k8s-ci-robot merged commit ec057ad into kubernetes-sigs:main Feb 4, 2022
@k8s-ci-robot k8s-ci-robot modified the milestones: v1.3.0, v1.x Feb 4, 2022
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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.

Make logging for creating/deleting AWS resources consistent
4 participants