Skip to content

fix: added prefix validation #329

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

Merged
merged 14 commits into from
Feb 12, 2025
Merged

fix: added prefix validation #329

merged 14 commits into from
Feb 12, 2025

Conversation

kierramarie
Copy link
Contributor

@kierramarie kierramarie commented Nov 15, 2024

Description

Added validation to check for proper prefix. The COS module has limit on the prefix, so each module that uses the COS module needs to adapt to this limit.

Git Issue: terraform-ibm-modules/terraform-ibm-cos#770

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@kierramarie
Copy link
Contributor Author

/run pipeline

alex-reiff
alex-reiff previously approved these changes Nov 20, 2024
@kierramarie
Copy link
Contributor Author

/run pipeline

@kierramarie
Copy link
Contributor Author

/run pipeline

@kierramarie
Copy link
Contributor Author

/run pipeline

@kierramarie
Copy link
Contributor Author

/run pipeline

@Ak-sky
Copy link
Member

Ak-sky commented Jan 20, 2025

/run pipeline

@Ak-sky
Copy link
Member

Ak-sky commented Jan 20, 2025

@kierramarie, can you please link the related github issue in the PR template and other missing info.

@Ak-sky
Copy link
Member

Ak-sky commented Jan 20, 2025

CRA scan failed with below error

Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Error: Invalid function argument
│ 
│   on variables.tf line 53, in variable "prefix":
│   53:         length(regexall("^.*--.*", var.prefix)) == 0
│     ├────────────────
│     │ while calling regexall(pattern, string)
│     │ var.prefix is null
│ 
│ Invalid value for "string" parameter: argument must not be null.
╵

Error: Process completed with exit code 1.

@kierramarie
Copy link
Contributor Author

/run pipeline

@kierramarie
Copy link
Contributor Author

/run pipeline

@kierramarie
Copy link
Contributor Author

/run pipeline

@kierramarie
Copy link
Contributor Author

/run pipeline

Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shemau
Copy link
Contributor

shemau commented Feb 12, 2025

Change to the DA will require a release, so I selected minor release.

This is the latest version of the regex which should overcome the previously reported 'argument must not be null'.

I have approved this change in a number of other DAs, so I have approved this one as well.

@toddgiguere toddgiguere merged commit fd17247 into main Feb 12, 2025
2 checks passed
@toddgiguere toddgiguere deleted the ks-add-prefix-val branch February 12, 2025 21:50
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.17.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

6 participants