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

Add new fields to integration test and distribution build publish libraries #496

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

prudhvigodithi
Copy link
Member

@prudhvigodithi prudhvigodithi commented Sep 12, 2024

Description

  • Add new component_repo and component_repo_url fields for both the distribution and integration test publish libs. With these fields all the distribution and integration test documents can be filtered by component_repo (or component_repo_url).
  • Since the OSD integration tests has multiple CI groups, filtering by component_repo should give the all the CI groups test failures.
  • The new fields test_stdout and test_stderr for both with-security and without-security should give users direct downloads links for the stderr and stdout errors. Thanks to @peterzhuamazon coming from Add test_stdout and test_stderr path/url for test-report.yml opensearch-build#5001.

Issues Resolved

Part of opensearch-project/opensearch-metrics#72 and opensearch-project/opensearch-metrics#51

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@prudhvigodithi prudhvigodithi force-pushed the main branch 2 times, most recently from 15318c9 to a284fbd Compare September 12, 2024 21:55
@prudhvigodithi prudhvigodithi changed the title Add new component_repo and component_repo_url fields Add new fields to integration test and distribution build publish libraries Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.32%. Comparing base (d88c840) to head (cb4c52e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #496   +/-   ##
=========================================
  Coverage     84.32%   84.32%           
  Complexity       80       80           
=========================================
  Files           108      108           
  Lines           523      523           
  Branches         61       61           
=========================================
  Hits            441      441           
  Misses           26       26           
  Partials         56       56           

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

@prudhvigodithi
Copy link
Member Author

Testing, following is the generate sample JSON documents which has all the added new fields

Integration test results

{
  "_index": "opensearch-integration-test-results-09-2024",
  "_id": "k4rD-5EBKO-WGAnwaj9C",
  "_version": 1,
  "_score": null,
  "_source": {
    "component": "skills",
    "component_repo": "skills",
    "component_repo_url": "https://github.com/opensearch-project/skills.git",
    "version": "2.17.0",
    "integ_test_build_number": 87,
    "integ_test_build_url": "https://ci-staging.opensearch.org/job/pgodithi/job/integ-test-publish/87/display/redirect",
    "distribution_build_number": "10292",
    "distribution_build_url": "https://build.ci.opensearch.org/blue/organizations/jenkins/distribution-build-opensearch/detail/distribution-build-opensearch/10154/pipeline",
    "build_start_time": 1726505450200,
    "rc": true,
    "rc_number": 6,
    "platform": "linux",
    "architecture": "arm64",
    "distribution": "tar",
    "component_category": "OpenSearch",
    "component_build_result": "passed",
    "test_report_manifest_yml": "https://ci.opensearch.org/ci/dbc/pgodithi/integ-test-publish/2.17.0/10292/linux/arm64/tar/test-results/87/integ-test/test-report.yml",
    "with_security": "pass",
    "with_security_build_yml": "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/with-security/skills.yml",
    "with_security_cluster_stdout": [
      "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/with-security/local-cluster-logs/id-0/stdout.txt"
    ],
    "with_security_cluster_stderr": [
      "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/with-security/local-cluster-logs/id-0/stderr.txt"
    ],
    "with_security_test_stdout": "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/with-security/stdout.txt",
    "with_security_test_stderr": "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/with-security/stderr.txt",
    "without_security": "pass",
    "without_security_build_yml": "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/without-security/skills.yml",
    "without_security_cluster_stdout": [
      "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/without-security/local-cluster-logs/id-1/stdout.txt"
    ],
    "without_security_cluster_stderr": [
      "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/without-security/local-cluster-logs/id-1/stderr.txt"
    ],
    "without_security_test_stdout": "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/without-security/stdout.txt",
    "without_security_test_stderr": "https://ci.opensearch.org/ci/dbc/integ-test/2.17.0/10292/linux/arm64/tar/test-results/8688/integ-test/skills/without-security/stderr.txt"
  },
  "fields": {
    "build_start_time": [
      "2024-09-16T16:50:50.200Z"
    ]
  },
  "sort": [
    1726505450200
  ]
}

Distribution build results

{
  "_index": "opensearch-distribution-build-results-09-2024",
  "_id": "Pq3N-5EBDMw2GPZSOcoY",
  "_version": 1,
  "_score": null,
  "_source": {
    "component": "OpenSearch",
    "component_repo": "OpenSearch",
    "component_repo_url": "https://github.com/opensearch-project/OpenSearch.git",
    "component_ref": "tags/2.16.0",
    "version": "2.16.0",
    "distribution_build_number": 6530,
    "distribution_build_url": "https://ci-staging.opensearch.org/job/pgodithi/job/distribution-build-opensearch/6530/display/redirect",
    "build_start_time": 1726505558993,
    "rc": false,
    "rc_number": 0,
    "component_category": "OpenSearch",
    "component_build_result": "passed"
  },
  "fields": {
    "build_start_time": [
      "2024-09-16T16:52:38.993Z"
    ]
  },
  "sort": [
    1726505558993
  ]
}

@@ -54,25 +54,32 @@ void call(Map args = [:]) {

manifest.components.each { component ->
def componentName = component.name
def componentRepo = component.repository.split('/')[-1].replace('.git', '')
def componentRepoUrl = component.repository
Copy link
Member

Choose a reason for hiding this comment

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

I think we should also remove .git here as sometimes people didnt add that in input manifest, causing bundle manifest to sometimes have .git sometimes not, which will make your data diverse for the same component at times.

Copy link
Member

Choose a reason for hiding this comment

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

I feel like we should also try to remove everything before github.com as people tend to mistype https vs http or anything, causing diverse data.

Copy link
Member

@peterzhuamazon peterzhuamazon Sep 16, 2024

Choose a reason for hiding this comment

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

so component repo url should just show opensearch-project/OpenSearch.

Copy link
Member Author

@prudhvigodithi prudhvigodithi Sep 16, 2024

Choose a reason for hiding this comment

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

Got It you mean https://github.com/opensearch-project/{component_name}, but this would cause problems in long term if we have to build and publish plugins from other org apart from opensearch-project. Also @peterzhuamazon with your automation the manifests are now auto generated from past release manifests so technically no errors and anyhow we review for new plugins that are added. Also if merged with errors and fixed later the new documents indexed will have the updated value for the component_repo_url.

Copy link
Member

@peterzhuamazon peterzhuamazon Sep 16, 2024

Choose a reason for hiding this comment

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

No, just strip https:// http:// .git and then index.
You dont need to hardcode the opensearch-project.
Index as github.com/opensearch-project/OpenSearch or similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking index as https://github.com/opensearch-project/OpenSearch and using OSD scripted fields just add opensearch-project/OpenSearch to reduce the field length for visualizations, but during any query it would return the full URL as https://github.com/opensearch-project/OpenSearch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

does it matter?
url with or without .git takes you to the same page.
Also, didn't get the reason behind dropping https?

Copy link
Member Author

Choose a reason for hiding this comment

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

Its because Rishab, when we browse (just try copy pasting this in browser) github.com/opensearch-project/OpenSearch, it should add https:// and add take us to the repo.

@prudhvigodithi
Copy link
Member Author

I can see the following after the latest commit, please check

Integration test publish:

    "component": "skills",
    "component_repo": "skills",
    "component_repo_url": "github.com/opensearch-project/skills",

Distribution build publish:

    "component": "OpenSearch",
    "component_repo": "OpenSearch",
    "component_repo_url": "github.com/opensearch-project/OpenSearch",
    "component_ref": "tags/2.16.0",

@peterzhuamazon
Copy link
Member

This PR will share the same version:
#497

Thanks.

@prudhvigodithi prudhvigodithi merged commit 5cc8d08 into opensearch-project:main Sep 17, 2024
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 17, 2024
…raries (#496)

Signed-off-by: Prudhvi Godithi <[email protected]>
(cherry picked from commit 5cc8d08)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants