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

new parameter for user to specify a ref for opensearch-dashboards-functional test #4260

Closed
wants to merge 13 commits into from

Conversation

chawinphat
Copy link
Contributor

Description

Added a new parameter to test_args "--ft-repo-ref" which allows users to specify which branch they want to checkout when testing opensearch-dashboards-functional test repo.

Issues Resolved

Closes #4057

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.

Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Copy link

codecov bot commented Dec 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (11f9ea4) 91.18% compared to head (99ece53) 91.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4260      +/-   ##
==========================================
+ Coverage   91.18%   91.19%   +0.01%     
==========================================
  Files         189      189              
  Lines        6146     6153       +7     
==========================================
+ Hits         5604     5611       +7     
  Misses        542      542              

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

Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Copy link
Member

@gaiksaya gaiksaya left a comment

Choose a reason for hiding this comment

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

src/test_workflow/test_args.py Outdated Show resolved Hide resolved
chawinphat and others added 6 commits December 11, 2023 09:25
Co-authored-by: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com>
Signed-off-by: Teddy Tankuranand <91317217+chawinphat@users.noreply.github.com>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
Signed-off-by: chawinphat <chawinphat@berkeley.edu>
@chawinphat chawinphat marked this pull request as ready for review January 2, 2024 12:46
Copy link
Member

@gaiksaya gaiksaya left a comment

Choose a reason for hiding this comment

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

LGTM! Adding @peterzhuamazon for another review.
We might also need to update the test_workflow documentation and jenkins workflows to accommodate this change.

@@ -57,10 +58,13 @@ def __init__(
)

# Integ-tests for OSD now clones FunctionalTestDashboards Repository by default and points to integtest.sh from FunctionalTestDashboards for all OSD plugins
functional_test_dashboards_ref = ft_repo_ref
Copy link
Member

Choose a reason for hiding this comment

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

Suggest getting consistent on the naming:

  1. If it is functional_test_repo, then use it consistently and avoid ft_repo.
  2. Keep it consistent with opensearch_dashboards instead of dashboards. (ex: build_manifest_opensearch_dashboards)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peterzhuamazon just saw these comments. Will work on it soon.

@@ -33,6 +34,7 @@ def __init__(self) -> None:
parser.add_argument("--test-run-id", type=int, help="The unique execution id for the test")
parser.add_argument("--component", type=str, dest="components", nargs='*', help="Test a specific component or components instead of the entire distribution.")
parser.add_argument("--keep", dest="keep", action="store_true", help="Do not delete the working temporary directory.")
parser.add_argument("--ft-repo-ref", type=str, default=None, dest="ft_repo_ref", help="Specify GitHub ref for functionalTestDashboards repo to override default one from build manifest.")
Copy link
Member

Choose a reason for hiding this comment

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

Suggest --functional-test-repo-ref, or anything that is consistent across the board just like mentioned above.

Comment on lines +159 to +161
def test_ft_repo_ref(self) -> None:
test_args = TestArgs()
self.assertEqual(test_args.ft_repo_ref, "main")
Copy link
Member

Choose a reason for hiding this comment

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

Is there any other test with user provided ref instead of default to main?

@peterzhuamazon
Copy link
Member

Thanks for contribution @chawinphat.

To my understanding, this PR added a new parameter for user to specify a ref.
If not, then default back to the commit from build manifest.

If so, then the title should be corrected as it is not always checkout release branch head commit.
Please correct me if that is not the case.

Thanks.

@chawinphat chawinphat changed the title opensearch-dashboards-functional test repo should always checkout release branch head commit added a new parameter for user to specify a ref for opensearch-dashboards-functional test Jan 22, 2024
@chawinphat chawinphat changed the title added a new parameter for user to specify a ref for opensearch-dashboards-functional test new parameter for user to specify a ref for opensearch-dashboards-functional test Jan 22, 2024
@peterzhuamazon
Copy link
Member

peterzhuamazon commented Feb 7, 2024

Close due to no activities and replace by:

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.

opensearch-dashboards-functional test repo should always checkout release branch head commit
3 participants