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

NativeLink Should Not Start if CAS and AC are the Same #768

Open
MarcusSorealheis opened this issue Mar 16, 2024 · 4 comments · May be fixed by #1555
Open

NativeLink Should Not Start if CAS and AC are the Same #768

MarcusSorealheis opened this issue Mar 16, 2024 · 4 comments · May be fixed by #1555
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@MarcusSorealheis
Copy link
Collaborator

If users try to start NativeLink configuring CAS and AC to use the same store, it should fail and provide a helpful error.

@MarcusSorealheis MarcusSorealheis added the bug Something isn't working label Mar 16, 2024
@MarcusSorealheis
Copy link
Collaborator Author

It is related to: #744

@allada allada added the good first issue Good for newcomers label Jun 26, 2024
@aleksdmladenovic
Copy link
Contributor

I'd like to work on this issue. cc: @allada , @MarcusSorealheis

@RickDeb2004
Copy link

I resolved the issue , but as @aleksdmladenovic raised a pr already , I am not raising my pr now without your permission @MarcusSorealheis .
But while reviewing his PR , I just want to suggest the modifications needed:

  1. to reduce time complexity I created a HashMap called cas_store_map from the CAS configuration, where the key is the instance_name and the value is a reference to the cas_store.

  2. then iterate over the AC configuration and check if the instance_name exists in the cas_store_map.

  3. we compare the store names, and if they match, we return an error.

I have added a integration test file also in my solution simple_store_conflict_test.sh in the integration_tests directory

Want to know what I have written in my script?

1)A function check_store_conflict to simulate checking for conflicts between CAS and AC configurations.

2)Two test cases:
test_conflict_when_cas_and_ac_use_same_store to verify that a conflict is detected when CAS and AC use the same store.
test_no_conflict_when_cas_and_ac_use_different_stores to verify that no conflict is detected when CAS and AC use different stores.
The script runs both test cases and prints the result of each test.

@MarcusSorealheis need your permission to raise my PR , otherwise I can assist @aleksdmladenovic in his PR as being an active contributor , I always respect opensource rules

@MarcusSorealheis
Copy link
Collaborator Author

MarcusSorealheis commented Jul 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
4 participants