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

feat: add random string function for upcoming secret generator refact #602

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

adohe
Copy link
Contributor

@adohe adohe commented Nov 16, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

add random string function for upcoming secret generator refact

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., design docs, usage docs, etc.:


@coveralls
Copy link

Pull Request Test Coverage Report for Build 6891886310

  • 17 of 17 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 75.549%

Totals Coverage Status
Change from base Build 6891595177: 0.08%
Covered Lines: 6952
Relevant Lines: 9202

💛 - Coveralls

@liu-hm19
Copy link
Contributor

Where will this method be used? If a randomly generated string based on the current time is added to the rendering logic of application resources, it may potentially cause changes in the generated Spec or Intent with every build/preview/apply operation, which might have an impact on the 3-way diff process.

@ffforest
Copy link
Contributor

ffforest commented Nov 17, 2023

Is this only used for non-terraform resources? To generate secrets in terraform resources we should just use the random provider - provides same functionality and handles diff already.

@adohe
Copy link
Contributor Author

adohe commented Nov 17, 2023

Is this only used for non-terraform resources? To generate secrets in terraform resources we should just use the random provider - provides same functionality and handles diff already.

This is only used for secret generator, so we put this package under secret.

@adohe
Copy link
Contributor Author

adohe commented Nov 17, 2023

Where will this method be used? If a randomly generated string based on the current time is added to the rendering logic of application resources, it may potentially cause changes in the generated Spec or Intent with every build/preview/apply operation, which might have an impact on the 3-way diff process.

This method will be used to generate random token string if and only if developers don't provide one in configuration also the impact on diff logic is as expected.

Copy link
Contributor

@elliotxx elliotxx left a comment

Choose a reason for hiding this comment

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

lgtm

@elliotxx elliotxx merged commit 1fcefeb into KusionStack:main Nov 17, 2023
6 checks passed
@adohe adohe deleted the update_secret_generator branch November 17, 2023 08:39
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2023
@ffforest ffforest linked an issue Jan 18, 2024 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: secret generator development
5 participants