Repository: opensearch-project/opensearch-build

Issue:
[BUG] BWC test suite does not run on Jenkins
**Describe the bug**
BWC test job fails to run Jenkins due to misconfigured directory to kick off tests. 

```
Running ./bundle-workflow/src/run_bwc_test.py --s3-bucket <artifact_s3_bucket> --opensearch-version 1.1.0 --build-id 163 --architecture x64 --test-run-id 6 ...
2021-09-17 21:50:08 INFO     Switching to temporary work_dir: /tmp/tmp70l5b7_e
Traceback (most recent call last):
  File "/var/jenkins/workspace/bwc-test/bundle-workflow/src/run_bwc_test.py", line 31, in <module>
    sys.exit(main())
  File "/var/jenkins/workspace/bwc-test/bundle-workflow/src/run_bwc_test.py", line 26, in main
    args.s3_bucket, args.build_id, args.opensearch_version, args.architecture, cur_dir)
  File "/var/jenkins/workspace/bwc-test/bundle-workflow/src/manifests/bundle_manifest.py", line 85, in from_s3
    S3Bucket(bucket_name).download_file(manifest_s3_path, work_dir)
  File "/var/jenkins/workspace/bwc-test/bundle-workflow/src/aws/s3_bucket.py", line 99, in download_file
    local_dir = Path(dest)
  File "/usr/lib64/python3.7/pathlib.py", line 1027, in __new__
    self = cls._from_parts(args, init=False)
  File "/usr/lib64/python3.7/pathlib.py", line 674, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/usr/lib64/python3.7/pathlib.py", line 658, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
```

**To Reproduce**
Run `/bundle-workflow/src/test.sh bwc-test --s3-bucket <artifact_s3_bucket> --opensearch-version 1.1.0 --build-id 163 --architecture x64 --test-run-id 6`



Discussion:

Resolving patch:
diff --git a/bundle-workflow/src/manifests/bundle_manifest.py b/bundle-workflow/src/manifests/bundle_manifest.py
--- a/bundle-workflow/src/manifests/bundle_manifest.py
+++ b/bundle-workflow/src/manifests/bundle_manifest.py
@@ -83,8 +83,7 @@ def from_s3(bucket_name, build_id, opensearch_version, architecture, work_dir=No
             build_id, opensearch_version, architecture
         )
         S3Bucket(bucket_name).download_file(manifest_s3_path, work_dir)
-        with open("manifest.yml", "r") as file:
-            bundle_manifest = BundleManifest.from_file(file)
+        bundle_manifest = BundleManifest.from_path(os.path.join(work_dir, 'manifest.yml'))
         os.remove(os.path.realpath(os.path.join(work_dir, "manifest.yml")))
         return bundle_manifest
 


Test patch:
diff --git a/bundle-workflow/src/run_bwc_test.py b/bundle-workflow/src/run_bwc_test.py
--- a/bundle-workflow/src/run_bwc_test.py
+++ b/bundle-workflow/src/run_bwc_test.py
@@ -11,7 +11,6 @@
 from manifests.bundle_manifest import BundleManifest
 from system import console
 from system.temporary_directory import TemporaryDirectory
-from system.working_directory import WorkingDirectory
 from test_workflow.bwc_test.bwc_test_suite import BwcTestSuite
 from test_workflow.test_args import TestArgs
 
@@ -21,10 +20,9 @@ def main():
     console.configure(level=args.logging_level)
     with TemporaryDirectory(keep=args.keep) as work_dir:
         logging.info("Switching to temporary work_dir: " + work_dir)
-        with WorkingDirectory(work_dir) as cur_dir:
-            bundle_manifest = BundleManifest.from_s3(
-                args.s3_bucket, args.build_id, args.opensearch_version, args.architecture, cur_dir)
-            BwcTestSuite(bundle_manifest, cur_dir, args.component, args.keep).execute()
+        bundle_manifest = BundleManifest.from_s3(
+            args.s3_bucket, args.build_id, args.opensearch_version, args.architecture, work_dir)
+        BwcTestSuite(bundle_manifest, work_dir, args.component, args.keep).execute()
 
 
 if __name__ == "__main__":