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

[Feature]: Check if a stack has been added twice in the config file #95

Open
aliabbasjaffri opened this issue Sep 30, 2024 · 9 comments
Assignees
Labels
good first issue Good for newcomers hacktoberfest Issues with this label are dedicated for the Hacktoberfest time.

Comments

@aliabbasjaffri
Copy link
Collaborator

aliabbasjaffri commented Sep 30, 2024

Describe the Feature

This feature checks if a stack or an application has been added twice in the config file and blocks user to deploy via that config.

Importance of the Feature

This feature restricts the user from deploying multiple stack applications via a single config file.

@aliabbasjaffri aliabbasjaffri added hacktoberfest Issues with this label are dedicated for the Hacktoberfest time. good first issue Good for newcomers labels Sep 30, 2024
@RINO-GAELICO
Copy link

Hi @aliabbasjaffri , I'd like to tackle this issue for hacktoberfest. Could you assign it to me?
Thanks

@aliabbasjaffri
Copy link
Collaborator Author

Sure @RINO-GAELICO! Good luck!

@RINO-GAELICO
Copy link

@aliabbasjaffri would src/mlinfra/terraform/terraform.py be a good place to add the new function check_for_duplicates?
This is would be the beginning of it.

def check_for_duplicates(self, config: dict):
        """
        This function checks if there are duplicate stacks or applications in the config.
        :param config: The loaded configuration dictionary
        """
        seen = set()
        duplicates = []

        stacks = config.get("stack", [])
        applications = config.get("applications", [])
        
        # TO BE CONTINUED

@aliabbasjaffri
Copy link
Collaborator Author

I'd rather have this check be in one of the files in src/mlinfra/stack_processor/stack_processor/, depending which stack is getting deployed

@Kuzay3t
Copy link

Kuzay3t commented Oct 12, 2024

I want to help, how can i assist?

@aliabbasjaffri
Copy link
Collaborator Author

hey @RINO-GAELICO are you still working on this task?

@RINO-GAELICO
Copy link

RINO-GAELICO commented Oct 15, 2024

@aliabbasjaffri yes I am.

Do you mean to have a check_for_duplicates in each of the files *_stack inside src/mlinfra/stack_processor/stack_processor/?

Is my understanding correct?

@RINO-GAELICO
Copy link

@aliabbasjaffri please let me know

@aliabbasjaffri
Copy link
Collaborator Author

Sorry for missing this message, yes you're correct with that understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Issues with this label are dedicated for the Hacktoberfest time.
Projects
None yet
Development

No branches or pull requests

3 participants