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

[tests-only][full-ci]send X-Request-Id in header of every request #7085

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

PrajwolAmatya
Copy link
Contributor

@PrajwolAmatya PrajwolAmatya commented Aug 22, 2023

Description

This PR includes the use of X-Request-Id header in each API requests. The X-Request-Id header consists the line reference of the scenario under test. If any of the test fails then oCIS server will log the error which contains request-id which represents the line reference of the failed scenario. For example, when any of the test fails oCIS server will provide the log as:

{"level":"error","service":"ocdav","name":"com.owncloud.web.ocdav","traceid":"00000000000000000000000000000000","request-id":"apiContract/propfind.feature:16-18","spaceid":"a428260f-6f47-4e9d-a939-6236977c3f8a$bbac7138-4375-4c27-8241-7ebe1e5af89d","path":"/","status":{"code":15,"message":"error getting upload id: Decomposedfs: error walking path: Decomposedfs: error walking path: decomposedfs: Wrap: readlink error: readlink /home/prajwol/.ocis/storage/users/spaces/bb/ac7138-4375-4c27-8241-7ebe1e5af89d/nodes/bb/ac/71/38/-4375-4c27-8241-7ebe1e5af89d: invalid argument","trace":"00000000000000000000000000000000"},"code":500,"time":"2023-09-05T15:14:31.495096701+05:45","message":"Internal Server Error"}

The server log consists of "request-id":"apiContract/propfind.feature:16-18", which indicates the apiContract test suite, propfind feature, the scenario at line 16 and the test step at line 18 has failed. Using this server information tracking of the failed scenario and its step will be easier.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Aug 22, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@PrajwolAmatya PrajwolAmatya force-pushed the get-xrequest-in-output branch 2 times, most recently from 66d85db to 63a022f Compare August 22, 2023 11:34
@PrajwolAmatya PrajwolAmatya changed the title [do-not-merge][full-ci]checking server log on CI [tests-only][full-ci]send X-Request-Id in header of every request Aug 22, 2023
@PrajwolAmatya PrajwolAmatya self-assigned this Sep 4, 2023
@PrajwolAmatya PrajwolAmatya force-pushed the get-xrequest-in-output branch 2 times, most recently from 128f7cb to ef50944 Compare September 4, 2023 04:30
@PrajwolAmatya PrajwolAmatya marked this pull request as ready for review September 4, 2023 04:45
@saw-jan
Copy link
Member

saw-jan commented Sep 5, 2023

Please, add the example log in the PR description from the oCIS server logs which contain the requiest-id defined by the tests

@PrajwolAmatya PrajwolAmatya force-pushed the get-xrequest-in-output branch 3 times, most recently from 86a15c4 to 02d1b7a Compare September 5, 2023 11:03
Copy link
Member

@SagarGi SagarGi left a comment

Choose a reason for hiding this comment

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

Other LGTM 👍

Copy link
Contributor

@SwikritiT SwikritiT left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants