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

all: document valid time duration units #6992

Merged
merged 1 commit into from Jul 28, 2023
Merged

all: document valid time duration units #6992

merged 1 commit into from Jul 28, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Jul 18, 2023

What does this PR do?

See title.

Also harmonise docs and clean up some copy/paste errors.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@elasticmachine
Copy link

elasticmachine commented Jul 18, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-07-28T03:00:18.846+0000

  • Duration: 73 min 25 sec

Test stats 🧪

Test Results
Failed 0
Passed 1108
Skipped 0
Total 1108

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Jul 18, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (128/128) 💚
Files 100.0% (173/173) 💚
Classes 100.0% (173/173) 💚
Methods 97.607% (1917/1964) 👍 6.161
Lines 90.406% (53813/59524) 👎 -1.085
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review July 18, 2023 06:05
@efd6 efd6 requested a review from a team as a code owner July 18, 2023 06:05
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@efd6
Copy link
Contributor Author

efd6 commented Jul 24, 2023

/test

Copy link
Contributor

@taylor-swanson taylor-swanson left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple minor nits:

  • Some descriptions only specify the following units: "h, m, s", while others list "ns, us, ms, s, m, h"
  • Some descriptions list "h/m/s" while others list "h, m, s"

@efd6
Copy link
Contributor Author

efd6 commented Jul 24, 2023

Agreed on the absence of a consistent convention. I (generally) followed package-local convention when adding the changes. We should decide on a consistent convention for all packages and then resolve to that, but this is work for a future PR IMO.

The first issue is intentional, while nearly all durations are parsed via time.Duration, and so all the units are syntactically acceptable, some (notably AWS-based inputs) use seconds expressed as uint32 and so smaller units would underflow and result in confusing behaviour for users. This is the difference there.

Also harmonise docs and clean up some copy/paste errors.
@taylor-swanson
Copy link
Contributor

Agreed on the absence of a consistent convention. I (generally) followed package-local convention when adding the changes. We should decide on a consistent convention for all packages and then resolve to that, but this is work for a future PR IMO.

The first issue is intentional, while nearly all durations are parsed via time.Duration, and so all the units are syntactically acceptable, some (notably AWS-based inputs) use seconds expressed as uint32 and so smaller units would underflow and result in confusing behaviour for users. This is the difference there.

Sorry for the late response, didn't see the notification for your comment.

Definitely agree, it'd be better to discuss it later and handle in a separate PR (this one is already quite big in terms of the number of files being touched).

That makes sense for the first issue. I was blindly assuming that everything consumed the Go duration, but makes sense that we'd extract some value from it to feed to a service.

@efd6 efd6 merged commit eff22fa into elastic:main Jul 28, 2023
4 checks passed
@elasticmachine
Copy link

Package 1password - 1.16.0 containing this change is available at https://epr.elastic.co/search?package=1password

@elasticmachine
Copy link

Package akamai - 2.13.0 containing this change is available at https://epr.elastic.co/search?package=akamai

@elasticmachine
Copy link

Package atlassian_bitbucket - 1.13.0 containing this change is available at https://epr.elastic.co/search?package=atlassian_bitbucket

@elasticmachine
Copy link

Package atlassian_confluence - 1.14.0 containing this change is available at https://epr.elastic.co/search?package=atlassian_confluence

@elasticmachine
Copy link

Package atlassian_jira - 1.14.0 containing this change is available at https://epr.elastic.co/search?package=atlassian_jira

@elasticmachine
Copy link

Package bitwarden - 1.1.0 containing this change is available at https://epr.elastic.co/search?package=bitwarden

@elasticmachine
Copy link

Package carbon_black_cloud - 1.12.0 containing this change is available at https://epr.elastic.co/search?package=carbon_black_cloud

@elasticmachine
Copy link

Package infoblox_bloxone_ddi - 1.7.0 containing this change is available at https://epr.elastic.co/search?package=infoblox_bloxone_ddi

@elasticmachine
Copy link

Package lastpass - 1.6.0 containing this change is available at https://epr.elastic.co/search?package=lastpass

@elasticmachine
Copy link

Package m365_defender - 1.15.0 containing this change is available at https://epr.elastic.co/search?package=m365_defender

@elasticmachine
Copy link

Package microsoft_exchange_online_message_trace - 1.9.0 containing this change is available at https://epr.elastic.co/search?package=microsoft_exchange_online_message_trace

@elasticmachine
Copy link

Package netflow - 2.11.0 containing this change is available at https://epr.elastic.co/search?package=netflow

@elasticmachine
Copy link

Package network_traffic - 1.20.0 containing this change is available at https://epr.elastic.co/search?package=network_traffic

@elasticmachine
Copy link

Package okta - 1.25.0 containing this change is available at https://epr.elastic.co/search?package=okta

@elasticmachine
Copy link

Package panw_cortex_xdr - 1.14.0 containing this change is available at https://epr.elastic.co/search?package=panw_cortex_xdr

@elasticmachine
Copy link

Package ping_one - 1.5.0 containing this change is available at https://epr.elastic.co/search?package=ping_one

@elasticmachine
Copy link

Package rapid7_insightvm - 1.1.0 containing this change is available at https://epr.elastic.co/search?package=rapid7_insightvm

@elasticmachine
Copy link

Package sentinel_one_cloud_funnel - 0.2.0 containing this change is available at https://epr.elastic.co/search?package=sentinel_one_cloud_funnel

@elasticmachine
Copy link

Package slack - 1.8.0 containing this change is available at https://epr.elastic.co/search?package=slack

@elasticmachine
Copy link

Package snyk - 1.12.0 containing this change is available at https://epr.elastic.co/search?package=snyk

@elasticmachine
Copy link

Package sophos_central - 1.6.0 containing this change is available at https://epr.elastic.co/search?package=sophos_central

@elasticmachine
Copy link

Package tanium - 1.1.0 containing this change is available at https://epr.elastic.co/search?package=tanium

@elasticmachine
Copy link

Package tcp - 1.11.0 containing this change is available at https://epr.elastic.co/search?package=tcp

@elasticmachine
Copy link

Package tenable_io - 1.2.0 containing this change is available at https://epr.elastic.co/search?package=tenable_io

@elasticmachine
Copy link

Package ti_abusech - 1.16.0 containing this change is available at https://epr.elastic.co/search?package=ti_abusech

@elasticmachine
Copy link

Package ti_cif3 - 1.2.0 containing this change is available at https://epr.elastic.co/search?package=ti_cif3

@elasticmachine
Copy link

Package ti_cybersixgill - 1.17.0 containing this change is available at https://epr.elastic.co/search?package=ti_cybersixgill

@elasticmachine
Copy link

Package ti_misp - 1.19.0 containing this change is available at https://epr.elastic.co/search?package=ti_misp

@elasticmachine
Copy link

Package ti_otx - 1.13.0 containing this change is available at https://epr.elastic.co/search?package=ti_otx

@elasticmachine
Copy link

Package ti_recordedfuture - 1.13.0 containing this change is available at https://epr.elastic.co/search?package=ti_recordedfuture

@elasticmachine
Copy link

Package ti_threatq - 1.14.0 containing this change is available at https://epr.elastic.co/search?package=ti_threatq

@elasticmachine
Copy link

Package trellix_epo_cloud - 1.1.0 containing this change is available at https://epr.elastic.co/search?package=trellix_epo_cloud

@elasticmachine
Copy link

Package trend_micro_vision_one - 1.6.0 containing this change is available at https://epr.elastic.co/search?package=trend_micro_vision_one

@elasticmachine
Copy link

Package udp - 1.11.0 containing this change is available at https://epr.elastic.co/search?package=udp

@elasticmachine
Copy link

Package zerofox - 1.14.0 containing this change is available at https://epr.elastic.co/search?package=zerofox

@elasticmachine
Copy link

Package zeronetworks - 1.2.0 containing this change is available at https://epr.elastic.co/search?package=zeronetworks

gizas pushed a commit that referenced this pull request Sep 5, 2023
Also harmonise docs and clean up some copy/paste errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text fields that accept durations should describe the allowed units
3 participants