Skip to content

Update the latest from ryanrath:symfony_migration into ubccr:symfony_migration#2230

Merged
ryanrath merged 81 commits into
ubccr:symfony_migrationfrom
ryanrath:symfony_migration
May 21, 2026
Merged

Update the latest from ryanrath:symfony_migration into ubccr:symfony_migration#2230
ryanrath merged 81 commits into
ubccr:symfony_migrationfrom
ryanrath:symfony_migration

Conversation

@ryanrath
Copy link
Copy Markdown
Contributor

@ryanrath ryanrath commented May 20, 2026

Description

This is just updating ubccr's symfony_migration branch from my personal branch where I've been doing all the dev work.

Motivation and Context

Tests performed

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

Routes with `{prefix}/` were broken in some cases due to `/` also being
matched by `.*`. Replacing `{prefix}/` with just `{prefix}` means these
routes function as intended.
This is a route that's used by selecting the "Download" button from the
"My Reports" section of the Report Generator.
This else-case was missed in initial migration.
So what the old `services.yaml#sso::login_link` property really was
meant to be was the referrer value that is included when the Identity
Provider makes a call to XDMoD's callback url so that we can
specifically identify the "entry point" of SSO authentication as opposed
to attempting to authenticate each and every request.
These changes clarify what's actually being done to configure SSO for XDMoD and
allow our current setup to work w/ how we actually tell people to setup
SimpleSAMLPhp in production as opposed to how we do it for our CI Pipeline. An
update to our CI SSO Setup will be forthcoming.
So not only was ErrorController essentially swallowing exceptions, it
didn't actually do what we needed it to ( catch thrown exceptions and
return 200OK w/ a json body ).

To actually implement the handling of Exceptions I've added a
RestExceptionListener that hooks into Symfony Kernel's life-cycle by listening for
 kernel.exception events, which occur when an exception is thrown while
processing a request.

Manual testing was done by manually throwing a `BadRequestHttpException`
in UserInterfaceController.php `index` function. The expected outcome
is that an error message is presented to the user in a js modal window.
It looks like ErrorController really is needed, after removing it and
adding RestExceptionListener roughly 40-50 integration tests failed due
to http status code differences. It looks like identifying the endpoints
that provide error messages to a user need to be identified and
specifically handled as opposed to a blanket approach.
These changes are in reference to:
https://github.com/orgs/ubccr/projects/5/views/1?pane=issue&itemId=142956534&issue=ubccr%7Cxdmod-xsede%7C1048
 which replaces usage of the PHP Super Global `$_REQUEST` w/ Symfony's Request.
This change had been removed in a commit previously, but must have been lost
somewhere along the way.
These changes came about when investigating what was causing symfony-dev to
"hang" with no error thrown.

The root cause of the problem was a new group by
that had been added to xdmod-dev / mysql-dev, but was not present in
symfony-dev's config files. But, it did surface a bug in the Symfony
implementation for the old controller endpoints. Specfically how they were ( or
were not ) dealing with exceptions.

By default Symfony will return a non-200 HTTP Status Code when an exception is
thrown. This is all well and good for "modern" front end's, but ExtJS 3.4 was
written in a by gone era where apparently web servers were supposed to return
200 OK regardless of exceptions.

These changes make it so that we explicitely wrap these old controller routes in
try-catch blocks and put a good face on things so that ExtJS can merrily get on
with life.
In this commit I've updated the internal dashboard login page so that it
is visually consistent with our current internal dashboard login page
and fixed the InternalDashboard logout functionality to work as it does
now.

Manual testing was done to confirm these changes work as intended.
ryanrath added 29 commits April 23, 2026 12:16
This commit reduces duplicate code by refactoring the user password
reset emailing to a helper service, which is then used by both the
resetting of a password in internal_dashboard and a regular user
requesting a password reset.

I also fixed problems w/ the `mode` and the image path that it's based
on.
This change fixes a discrepancy found on symfony-dev that is documented
here: ubccr/xdmod-xsede#1243

Basically PHP 8.2 is a lot more strict about types and didn't like that
we were passing `null` as an argument that was defined as `string` not
`?string`. Now that `$requestedFormat` accepts `null` values it all
works as expected.
The problem being fixed is that url param `realms` as defined in the
route for `WarehouseController.php::searchJobsByAction` contains either
`jobs` or `cloud`, which is fine when those are the only two realms
being requested. But when you request for the SUPREMM realm the `realms`
parameter is still `jobs` and the `realm` query param is `SUPREMM`. So
it is not valid to use the variable taht contains `realms` for the
`realm`. Yay for being ridiculously confusing!.

This fixes this behavior by always using the `realm` query param.
@ryanrath ryanrath merged commit 7e32f05 into ubccr:symfony_migration May 21, 2026
5 checks passed
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.

1 participant