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

[atlassian_jira] Ensure from/to timestamps are properly encoded #7759

Merged
merged 4 commits into from
Sep 13, 2023

Conversation

taylor-swanson
Copy link
Contributor

@taylor-swanson taylor-swanson commented Sep 11, 2023

What does this PR do?

  • Ensure that from/to timestamps are properly encoded as positive (+) timezone offsets may be interpreted as spaces by the other end (Jira Cloud).

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.

How to test this PR locally

elastic-package test

- Ensure that from/to timestamps are properly encoded as
positive (+) timezone offsets may be interpreted as spaces
by the other end (Jira Cloud).
@taylor-swanson taylor-swanson added bug Something isn't working, use only for issues Team:Security-External Integrations Integration:atlassian_jira Atlassian Jira labels Sep 11, 2023
@taylor-swanson taylor-swanson self-assigned this Sep 11, 2023
@elasticmachine
Copy link

elasticmachine commented Sep 11, 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-09-13T12:43:52.953+0000

  • Duration: 17 min 52 sec

Test stats 🧪

Test Results
Failed 0
Passed 10
Skipped 0
Total 10

🤖 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 Sep 11, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (3/3) 💚
Classes 100.0% (3/3) 💚
Methods 100.0% (24/24) 💚
Lines 98.845% (428/433) 👎 -0.335
Conditionals 100.0% (0/0) 💚

@taylor-swanson taylor-swanson marked this pull request as ready for review September 11, 2023 17:44
@taylor-swanson taylor-swanson requested a review from a team as a code owner September 11, 2023 17:44
@elasticmachine
Copy link

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

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

Can you modify the system test such that it would fail without this fix?

@andrewkroh
Copy link
Member

Can you please also inspect the atlassian_confluence integration to see if it suffers from a similar lack of url-encoding, and if so open an issue.

@taylor-swanson
Copy link
Contributor Author

Can you please also inspect the atlassian_confluence integration to see if it suffers from a similar lack of url-encoding, and if so open an issue.

At a quick glance, looks like it uses the same methods, so very likely suffers from the same problem. I can open a new issue.

- Set pagination parameters via set transforms
- Add regex validation for from/to timestamps in system tests
- Add hit count asserts for system tests
@taylor-swanson
Copy link
Contributor Author

Can you modify the system test such that it would fail without this fix?

I added regex and hit counts to validate the tests. Adding anchors to the regex didn't seem to work and I don't know why. I'm not entirely sure what string it is testing against, but I do know it's after it has been decoded (i.e., I have to test for +, not %2B).

@taylor-swanson taylor-swanson merged commit bdf94f4 into elastic:main Sep 13, 2023
4 checks passed
@taylor-swanson taylor-swanson deleted the sdh/3804-jira branch September 13, 2023 13:06
@elasticmachine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, use only for issues Integration:atlassian_jira Atlassian Jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants