Skip to content

Adding Variables to an existing Environment does not work  #660

@luvsaxena1

Description

@luvsaxena1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions