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

Adding Variables to an existing Environment does not work #660

Closed
luvsaxena1 opened this issue Aug 1, 2024 · 2 comments
Closed

Adding Variables to an existing Environment does not work #660

luvsaxena1 opened this issue Aug 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@luvsaxena1
Copy link
Contributor

luvsaxena1 commented Aug 1, 2024

Problem Description

Safe settings does not detect addition of environment variables.

What is actually happening

Steps to reproduce:

  1. Create Environment first time with one variable, Safe settings will create that environment and add variable to it.
  2. Update Settings and add second variable to an existing environment. Safe settings does not determine the changes to the environment variable and hence does not create it.

What is the expected behavior

It should determine that variable has been added to the environment during dry run and implement changes once PR is merged.

Error output, if available

After debugging the code, looks like mergeDeep.compareDeep(existingRecords, filteredEntries) is not able to determine the changes correctly.

Please find debug screen shots
existingRecords object with one variable in it
Screenshot 2024-08-01 at 2 23 14 PM

filteredEntries object with two variable in it
Screenshot 2024-08-01 at 2 23 39 PM

results object with addition key as empty
Screenshot 2024-08-01 at 2 22 38 PM

PR Screenshots:
Screenshot 2024-08-01 at 2 28 11 PM

Dry run results on my PR (No addition on Environment Detected)
Screenshot 2024-08-01 at 2 41 22 PM

Context

Are you using the hosted instance of probot/settings or running your own?

Running our own and deployed using community helm chart

If running your own instance, are you using it with github.com or GitHub Enterprise?

Both, However, noticed similar behavior on both instance.

Version of probot/settings

2.1.10

Version of GitHub Enterprise

3.11.10

@luvsaxena1
Copy link
Contributor Author

PR to fix the issue
#665

@luvsaxena1
Copy link
Contributor Author

This is fixed after meting PR 665, So closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant