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

Implement unique project name validation in Digger configuration #1767

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

NikhilKalloli
Copy link

Closes #1309
This PR implements a crucial feature to ensure that project names in the Digger configuration (digger.yml) are unique. This is an important prerequisite for proper functionality, as Digger relies on project names to organize various resources, including state files.

Key Changes to Digger Configuration

1. Updated ValidateDiggerConfigYaml function in libs/digger_config/yaml.go:

  • Added a check to ensure project names are unique across all projects.
  • Returns an error if a duplicate project name is found, along with a descriptive message.

2. Modified ConvertDiggerYamlToConfig function in libs/digger_config/converters.go:

  • Implemented an additional check for duplicate project names during the configuration parsing process.
  • Returns an error if any duplicate project names are found.

3. Added a new test case TestDiggerConfigDuplicateProjectNames in libs/digger_config/digger_config_test.go:

  • Verifies that an error is raised when duplicate project names are present in the configuration.

4. Updated Documentation in docs/ce/reference/digger.yml.mdx:

  • Added a new section Project Name Uniqueness explaining the requirement for unique project names.
  • Provided examples of incorrect and correct project name configurations.
  • Updated the "Project" table in the "Reference" section to specify that the name field must be unique across all projects.

Please review these changes and let me know if any further modifications or clarifications are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

digger.yml validation: ensure that project names are unique
1 participant