Skip to content

fix: fix ResourceSettings mode conflict logic#7326

Merged
cheftako merged 2 commits into
GoogleCloudPlatform:masterfrom
codebot-robot:issue-7325-hpbt
Apr 7, 2026
Merged

fix: fix ResourceSettings mode conflict logic#7326
cheftako merged 2 commits into
GoogleCloudPlatform:masterfrom
codebot-robot:issue-7325-hpbt

Conversation

@codebot-robot

@codebot-robot codebot-robot commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes a bug in the ResourceSettings mode conflict logic introduced in #6243.
The previous logic would log a warning and skip the conflict check if both
ConfigConnector and ConfigConnectorContext were present but had different modes.
This caused TestResourceExclusion/ConflictMode to fail as it expected an error.

This PR ensures that the conflict check is performed first if both settings are present.

Fixes #7325

Generated by Overseer (powered by the gemini-3-flash-preview model).

The previous logic would log a warning and skip the conflict check if one
setting was 'include' and the other was missing or 'exclude'. This caused
TestResourceExclusion/ConflictMode to fail because it expected a conflict
error but got nil (and a warning log).

This change ensures that if both settings are present, they are checked for
conflict first.

Fixes GoogleCloudPlatform#7325
@codebot-robot codebot-robot changed the title [WIP] Reproduce mainline breakage fix: fix ResourceSettings mode conflict logic Apr 7, 2026
@codebot-robot

Copy link
Copy Markdown
Collaborator Author

--- INVESTIGATION REPORT ---
Run ID: 24056687416
Name: Presubmit (validations)
Cause: Code Error (Formatting)
Details: The commit d341f35cdf604c1615d5d19a843ec9a22fad7d0d deliberately added // no-op at the end of pkg/controller/registration/registration_controller.go without a trailing newline, causing a go fmt failure in the validations check.
Action Taken: Pushed a new commit 3042aa90ea4ba6114bcec48b27df0a3cc16bd1df that correctly implements the fix and follows the project's formatting standards. The validations check now passes on the latest commit.

Note: The fuzz-roundtrippers failure observed on the current commit is unrelated to the PR changes, as it is also failing on the master branch (e.g., run 23974763941).

(This report was generated by Overseer)

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

I have assigned a coding agent to investigate the CI failures in this PR. (Overseer)

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

--- INVESTIGATION REPORT ---
Run ID: 24057342827
Name: ci-presubmit (fuzz-roundtrippers)
Cause: Infrastructure
Details: The fuzz-roundtrippers job failed on TestSomeMappers, failing with a hint to add f.Unimplemented_NotYetTriaged(".reachability_details.traces[].steps[].ip_masquerading_skipped") for google.cloud.networkmanagement.v1.ConnectivityTest. This is an unrelated failure caused by upstream proto changes that is also affecting the master branch.
Action Taken: None

Run ID: 24056687416
Name: Presubmit (validations)
Cause: Code Error
Details: This run failed on a previous commit (d341f35cdf604c1615d5d19a843ec9a22fad7d0d) due to a go fmt issue (missing trailing newline).
Action Taken: This issue was already fixed in the previous investigation by pushing the commit 3042aa90ea4ba6114bcec48b27df0a3cc16bd1df.

(This report was generated by Overseer)

@codebot-robot

Copy link
Copy Markdown
Collaborator Author

--- INVESTIGATION REPORT ---
Run ID: 24057342827
Name: ci-presubmit (fuzz-roundtrippers)
Cause: Infrastructure
Details: The fuzz-roundtrippers job was failing in TestSomeMappers due to a newly added ip_masquerading_skipped field in the upstream proto for google.cloud.networkmanagement.v1.ConnectivityTest.
Action Taken: Pushed commit 2432c929d3 which updates pkg/controller/direct/networkmanagement/connectivitytest_fuzzer.go to mark ip_masquerading_skipped as Unimplemented_NotYetTriaged in the fuzzer, which will resolve this upstream flake.

Run ID: 24056687416
Name: Presubmit (validations)
Cause: Code Error
Details: This is an older run ID referring to a go fmt formatting error on a previous commit.
Action Taken: None required now. This was already fixed in the previous investigation by pushing commit 3042aa90ea4ba6114bcec48b27df0a3cc16bd1df.

(This report was generated by Overseer)

@cheftako cheftako left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good

@cheftako cheftako added this pull request to the merge queue Apr 7, 2026
@google-oss-prow google-oss-prow Bot added the lgtm label Apr 7, 2026
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codebot-robot codebot-robot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The PR has been approved and all CI checks are passing. The upstream fuzzer issue has been addressed. Ready for merge.\n\n*(This comment was generated by Overseer)*

Merged via the queue into GoogleCloudPlatform:master with commit 5edf0b0 Apr 7, 2026
166 checks passed
@acpana

acpana commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

This worked for the relevant failure but I think it uncovered another one!

fuzz: elapsed: 51s, execs: 51278 (1084/sec), new interesting: 21 (total: 21)
fuzz: elapsed: 54s, execs: 54597 (1106/sec), new interesting: 21 (total: 21)
fuzz: elapsed: 57s, execs: 57687 (1030/sec), new interesting: 21 (total: 21)
fuzz: elapsed: 1m0s, execs: 60827 (1047/sec), new interesting: 21 (total: 21)
fuzz: elapsed: 1m0s, execs: 60827 (0/sec), new interesting: 21 (total: 21)
--- FAIL: FuzzCloudIdentityGroupSpec (60.06s)
    context deadline exceeded
=== NAME  
FAIL
exit status 1
FAIL	github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/cloudidentity	60.086s
<hint_for_agent>Run 'dev/ci/presubmits/fuzz-roundtrippers' to fix.</hint_for_agent>
Error: Process completed with exit code 1.

We should instruct the agents to run the fuzzers for at least 1-2 hrs to see/ catch all the issues.

@cheftako cheftako added this to the 1.149 milestone Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Main line is broken at head

3 participants