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

Validation succeed as long as status code in response is 200 #6399

Conversation

cliu123
Copy link
Member

@cliu123 cliu123 commented Apr 10, 2024

Description

Data source validation should pass as long as response code is 200 even if response body is empty, for example:

{
  body: '',
  statusCode: 200,
  headers: {
    'content-type': 'text/plain; charset=UTF-8',
    'content-length': '0',
    'x-envoy-upstream-service-time': '44',
    date: 'Wed, 10 Apr 2024 06:10:28 GMT',
    server: 'aoss-amazon-m',
    'x-request-id': '284bf59f-4601-9ce9-ba7b-2c2282e34c17'
  },
  meta: {
    context: null,
    request: { params: [Object], options: {}, id: 1 },
    name: 'opensearch-js',
    connection: {
      url: 'https://vywd1o523wrumu9h3q05.gamma-us-east-1.aoss.amazonaws.com/',
      id: 'https://vywd1o523wrumu9h3q05.gamma-us-east-1.aoss.amazonaws.com/',
      headers: {},
      deadCount: 0,
      resurrectTimeout: 0,
      _openRequests: 0,
      status: 'alive',
      roles: [Object]
    },
    attempts: 0,
    aborted: false
  }
}

Issues Resolved

#6396

Screenshot

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: cliu123 <lc12251109@gmail.com>
@cliu123 cliu123 force-pushed the fix-data-source-connection-validation-issue branch from e53b3dc to b5d79e1 Compare April 10, 2024 21:45
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.05%. Comparing base (85df662) to head (e53b3dc).
Report is 12 commits behind head on main.

❗ Current head e53b3dc differs from pull request most recent head d906a28. Consider uploading reports for the commit d906a28 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6399       +/-   ##
===========================================
- Coverage   55.58%   45.05%   -10.54%     
===========================================
  Files        1199     1650      +451     
  Lines       24259    33471     +9212     
  Branches     4087     6359     +2272     
===========================================
+ Hits        13485    15079     +1594     
- Misses      10133    17225     +7092     
- Partials      641     1167      +526     
Flag Coverage Δ
Linux_3 45.05% <100.00%> (?)
Windows_2 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cliu123
Copy link
Member Author

cliu123 commented Apr 10, 2024

@bbarani @gaiksaya @kavilla Could we include this fix in 2.13.1?
Cc: @seraphjiang

@cliu123
Copy link
Member Author

cliu123 commented Apr 11, 2024

This fix will be backported to 2.13 branch for next patch release of 2.13.x.
Discussion: #6396 (comment)

@seraphjiang
Copy link
Member

#6396

@seraphjiang
Copy link
Member

@xinruiba @bandinib-amzn @Flyingliuhub @ZilongX @BionIT @zhongnansu

please help to take a look when you got time

@xinruiba
Copy link
Member

LGTM, thanks for this change

@BionIT BionIT merged commit 476cffc into opensearch-project:main Apr 14, 2024
75 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 14, 2024
Signed-off-by: cliu123 <lc12251109@gmail.com>
(cherry picked from commit 476cffc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 14, 2024
Signed-off-by: cliu123 <lc12251109@gmail.com>
(cherry picked from commit 476cffc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ZilongX pushed a commit that referenced this pull request Apr 15, 2024
…6446)

Signed-off-by: cliu123 <lc12251109@gmail.com>
(cherry picked from commit 476cffc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@cliu123 cliu123 deleted the fix-data-source-connection-validation-issue branch April 21, 2024 06:18
@kavilla kavilla added the v2.13.0 label May 2, 2024
BionIT pushed a commit that referenced this pull request Jun 4, 2024
…6447)

Signed-off-by: cliu123 <lc12251109@gmail.com>
(cherry picked from commit 476cffc)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: ZilongX <99905560+ZilongX@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants