Skip to content

Forbid mismatched inner element in XML flow inputs#3104

Open
gbrodman wants to merge 1 commit into
google:masterfrom
gbrodman:flowPicker
Open

Forbid mismatched inner element in XML flow inputs#3104
gbrodman wants to merge 1 commit into
google:masterfrom
gbrodman:flowPicker

Conversation

@gbrodman

@gbrodman gbrodman commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This change is Reviewable

@gbrodman gbrodman requested a review from CydeWeys June 23, 2026 20:49

@CydeWeys CydeWeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@CydeWeys made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on gbrodman).


core/src/main/java/google/registry/flows/picker/FlowPicker.java line 259 at r1 (raw file):

      throw new MissingCommandException();
    }
    if (innerCommand instanceof ResourceCommandWrapper resourceCommandWrapper) {

I guess I don't understand what this is protecting against. Before this check was added, what was it doing? Surely the test XML of a create inside a check would fail?

@gbrodman gbrodman 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.

@gbrodman made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on CydeWeys).


core/src/main/java/google/registry/flows/picker/FlowPicker.java line 259 at r1 (raw file):

Previously, CydeWeys (Ben McIlwain) wrote…

I guess I don't understand what this is protecting against. Before this check was added, what was it doing? Surely the test XML of a create inside a check would fail?

apparently that wouldn't fail! it's not catastrophic, but that was theoretically possible before and it'd make the metrics slightly incorrect e

@CydeWeys CydeWeys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@CydeWeys made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on gbrodman).


core/src/main/java/google/registry/flows/picker/FlowPicker.java line 259 at r1 (raw file):

Previously, gbrodman wrote…

apparently that wouldn't fail! it's not catastrophic, but that was theoretically possible before and it'd make the metrics slightly incorrect e

OK but if it wasn't failing, then what was actually happening? What does a create inside of a check do?

@gbrodman gbrodman 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.

@gbrodman made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on CydeWeys).


core/src/main/java/google/registry/flows/picker/FlowPicker.java line 259 at r1 (raw file):

Previously, CydeWeys (Ben McIlwain) wrote…

OK but if it wasn't failing, then what was actually happening? What does a create inside of a check do?

It would perform the create, but our metrics would mark it as a check because the metrics use the outer command type instead of any possible inner commands that might exist

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