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: update VariableScope to add support for prefix #1364

Merged

Conversation

Pranav2612000
Copy link
Contributor

@Pranav2612000 Pranav2612000 commented Jul 10, 2024

Why do we need this change?

  • We want to extend the VariableScope to accept a prefix. This will allow accessing the VariableList values without needing to pass in the prefix ( for the types which have one )
    For e.g Accessing vault secret using VariableScope.get('secret') when the key in the VariableList is vault:secret.

How does it work?

  • We have update the VariableScope to accept a prefix configuration variable in the definition.
  • In the constructor, we set the prefix equal to the prefix ( if it exists, default value is '')
  • We have updated the get, set, has methods ( and other changes to make them work ) to add/remove the prefix ( fetched from prefix ) from the key, if it exists.

@Pranav2612000 Pranav2612000 force-pushed the feat/createVaultVariableScope branch from 7f6aa1f to ec8e691 Compare July 10, 2024 06:07
@Pranav2612000 Pranav2612000 changed the title feat: create VaultVariableScope [TRUST-1152] [TRUST-1311] feat: create VaultVariableScope Jul 10, 2024
@Pranav2612000 Pranav2612000 force-pushed the feat/createVaultVariableScope branch 2 times, most recently from 50958a9 to b6d68e3 Compare July 10, 2024 13:08
@Pranav2612000 Pranav2612000 changed the title [TRUST-1152] [TRUST-1311] feat: create VaultVariableScope feat: create VaultVariableScope Jul 12, 2024
@Pranav2612000 Pranav2612000 changed the title feat: create VaultVariableScope feat: update VariableScope to add support for prefix Jul 12, 2024
@Pranav2612000 Pranav2612000 force-pushed the feat/createVaultVariableScope branch 2 times, most recently from f006a5a to 7c67eb9 Compare July 15, 2024 08:02
This change allows us to use the current VariableScope
with VaultVariables which have a fixed 'vault' prefix
@Pranav2612000 Pranav2612000 force-pushed the feat/createVaultVariableScope branch from 7c67eb9 to 300538d Compare July 15, 2024 08:14
@codenirvana codenirvana force-pushed the feat/createVaultVariableScope branch from e09a254 to 9d752ab Compare July 29, 2024 08:21
@codenirvana codenirvana force-pushed the feat/createVaultVariableScope branch from 9d752ab to 75e9e9b Compare July 29, 2024 09:10
@codenirvana codenirvana merged commit ef65526 into postmanlabs:develop Jul 29, 2024
2 checks passed
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.

2 participants