Skip to content

Commit a88815a

Browse files
authored
Fix ASV test failures and Installation Test Failures on Master (#2578)
#### Reference Issues/PRs <!--Example: Fixes #1234. See also #3456.--> #### What does this implement or fix? ASV tests - ASV workflow does not contain Azure creds. Attempt to extract azure creds failed due to unsafe usage of re.match().group installation tests cannot include any package from arcticdb. Yet last minute change symlinked mark.py file which indirectly contained such include - hence tests failed. Run from changed installation tests: https://github.com/man-group/ArcticDB/actions/runs/16957844233/job/48063492318 #### Any other comments? #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing --> --------- Co-authored-by: Georgi Rusev <Georgi Rusev>
1 parent 8c2e441 commit a88815a

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

.github/actions/set_persistent_storage_env_vars/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323

2424
run: |
2525
# Common
26-
if [[ "${{inputs.persistent_storage}}" != "no" ]]; then
26+
if [[ -n "${{ inputs.persistent_storage }}" && "${{inputs.persistent_storage}}" != "no" ]]; then
2727
echo "ARCTICDB_PERSISTENT_STORAGE_TESTS=1" >> $GITHUB_ENV
2828
fi
2929
echo "ARCTICDB_PERSISTENT_STORAGE_UNIQUE_ID=${{ github.ref_name }}_${{ github.run_id }}" >> $GITHUB_ENV

.github/workflows/build_with_conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
gcp_secret_key: "${{ secrets.GCP_S3_SECRET_KEY }}"
145145
azure_container: "githubblob" # DEFAULT BUCKET FOR AZURE
146146
azure_connection_string: "${{ secrets.AZURE_CONNECTION_STRING }}"
147-
persistent_storage: ${{ inputs.persistent_storage }}
147+
persistent_storage: ${{ inputs.persistent_storage || 'no' }}
148148

149149
- name: Set ArcticDB Debug Logging
150150
if: ${{ inputs.run_enable_logging }}
@@ -248,7 +248,7 @@ jobs:
248248
gcp_secret_key: "${{ secrets.GCP_S3_SECRET_KEY }}"
249249
azure_container: "githubblob" # DEFAULT BUCKET FOR AZURE
250250
azure_connection_string: "${{ secrets.AZURE_CONNECTION_STRING }}"
251-
persistent_storage: ${{ inputs.persistent_storage }}
251+
persistent_storage: ${{ inputs.persistent_storage || 'no' }}
252252

253253
- name: Set ArcticDB Debug Logging
254254
if: ${{ inputs.run_enable_logging }}

python/arcticdb/storage_fixtures/azure.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,17 @@ def __str__(self):
281281
return f"[{type(self)}=Container:{self.default_container}], ConnectionString:{self.connection_string}"
282282

283283
def initialize_from_connection_sting(self, constr: str, container: str, prefix: str = None) -> "AzureStorageFixtureFactory":
284+
def extract_from_regex(re_expr: str, constr: str) -> str:
285+
match = re.search(re_expr, constr)
286+
return match.group(1) if match else ""
287+
284288
if constr is None: get_logger().error(f"Azure connection string not available: {constr}")
285289
if container is None: get_logger().error(f"Azure container not available: {container}")
286290
AzureStorageFixtureFactory.connection_string = constr
287-
AzureStorageFixtureFactory.account_name = re.search(r'AccountName=([^;]+)', constr).group(1)
288-
AzureStorageFixtureFactory.account_key = re.search(r'AccountKey=([^;]+)', constr).group(1)
289-
AzureStorageFixtureFactory.protocol = re.search(r'DefaultEndpointsProtocol=([^;]+)', constr).group(1)
290-
endpoint_suffix = re.search(r'EndpointSuffix=([^;]+)', constr).group(1)
291+
AzureStorageFixtureFactory.account_name = extract_from_regex(r'AccountName=([^;]+)', constr)
292+
AzureStorageFixtureFactory.account_key = extract_from_regex(r'AccountKey=([^;]+)', constr)
293+
AzureStorageFixtureFactory.protocol = extract_from_regex(r'DefaultEndpointsProtocol=([^;]+)', constr)
294+
endpoint_suffix = extract_from_regex(r'EndpointSuffix=([^;]+)', constr)
291295
AzureStorageFixtureFactory.endpoint = f"{AzureStorageFixtureFactory.protocol}://{AzureStorageFixtureFactory.account_name}.blob.{endpoint_suffix}"
292296
AzureStorageFixtureFactory.default_container = container
293297
if prefix:

python/installation_tests/client_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121

2222

2323
from logger import get_logger
24-
from mark import LINUX
2524

25+
MACOS = sys.platform.lower().startswith("darwin")
26+
LINUX = sys.platform.lower().startswith("linux")
27+
WINDOWS = sys.platform.lower().startswith("win32")
2628

2729
logger = get_logger()
2830

python/installation_tests/mark.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

python/installation_tests/test_installation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
random_floats,
3232
)
3333
from arcticdb.version_store.processing import QueryBuilder
34-
from installation_tests.client_utils import delete_library
34+
from client_utils import delete_library
3535

3636

3737
PRE_4_X_X = (

0 commit comments

Comments
 (0)