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

Inconsistent diffs and behaviour #693

Open
jace-ys opened this issue Sep 27, 2024 · 1 comment
Open

Inconsistent diffs and behaviour #693

jace-ys opened this issue Sep 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jace-ys
Copy link

jace-ys commented Sep 27, 2024

Problem Description

We've been using safe-settings to manage a bunch of our repos now and for the most part it's been great 🎉 Unfortunately, we've encountered a couple of bugs/inconsistencies while using it, which make it hard to be confident that the right settings are applied from an infrastructure-as-code perspective.

What is actually happening

A few things we've hit:

Inaccurate diffs

Occasionally we get inaccurate or unexpected diffs on the PR comments. For example:

Screen Shot 2024-09-27 at 17 17 09

This was for a change where we didn't modify the collaborators setting.

Doesn’t handle deletion of settings very well

We are trying to replace our existing branch protection rules with rulesets, but removing/emptying the branches setting didn't actually do a delete of the branch protection rules as we expected.

branches: []

rulesets:
- name: default
  target: branch
  enforcement: active
  ...

Another case is where we tried to remove the integration_id on a status check context, but it was not actually removed:

  - type: required_status_checks
    parameters:
      strict_required_status_checks_policy: true
      required_status_checks:
      - context: "my ci check"
        integration_id: 1234567 # Removing this line didn't actually do anything

Missing context on PR comments and status check results

We also noticed that the PR comments and status checks reported by safe-settings are not always very informative or have the right context. See the following examples:

image
image (1)

Keen to know if these are genuine bugs or if there's something we've missed when setting up safe-settings! 🙏🏻

Context

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

We are running our own instance in a Kubernetes cluster

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

We are using it with standard github.com (Team plan)

Version of probot/settings

Helm chart version 2.1.11 (appVersion 2.1.2)

Version of GitHub Enterprise

N/A

@jace-ys jace-ys added the bug Something isn't working label Sep 27, 2024
@sanglt
Copy link

sanglt commented Nov 18, 2024

Thanks for bring this up. We have the same issue - convert the branch protection rule to ruleset is a nightmare because we are having ~2000 repos. I try to remove the branches or set it to an empty array, so far nothing works.

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

2 participants