Skip to content

Add missing endpoint to exception message in ExecuteSql.#1929

Merged
aaronweeden merged 1 commit intoubccr:xdmod11.0from
aaronweeden:fix-execute-sql-exception
Feb 4, 2025
Merged

Add missing endpoint to exception message in ExecuteSql.#1929
aaronweeden merged 1 commit intoubccr:xdmod11.0from
aaronweeden:fix-execute-sql-exception

Conversation

@aaronweeden
Copy link
Copy Markdown
Contributor

Description

The ETL maintenance class ExecuteSql only uses destinationEndpoint, not sourceEndpoint. However, when exceptions are logged, it tries to report the sourceEndpoint. This PR fixes this to instead report the destinationEndpoint.

Tests performed

I ran an SQL query on my port on xdmod-dev that I knew was incorrect, and it reported the following (note that the endpoint is not reported):

xsede.migration-11_0_0p1-11_0_0p2.MapUnknownOodPeople (ETL\Maintenance\ExecuteSql): Error executing SQL Exception: 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'modw.page_impressions' doesn't exist'

Then I applied the fix, ran it again, and the endpoint is now reported in the exception:

xsede.migration-11_0_0p1-11_0_0p2.MapUnknownOodPeople (ETL\Maintenance\ExecuteSql): Error executing SQL Exception: 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'modw.page_impressions' doesn't exist' Using DataEndpoint: '('Database with Open OnDemand usage data', class=ETL\DataEndpoint\Mysql, config=datawarehouse, schema=modw_ondemand, host=mysql-dev.ccr.xdmod.org:3306, user=xdmod)'

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

@aaronweeden aaronweeden added bug Bugfixes Category:ETL Extract Transform Load php Pull requests that update Php code labels Oct 16, 2024
@aaronweeden aaronweeden added this to the 11.0.1 milestone Oct 16, 2024
@jpwhite4
Copy link
Copy Markdown
Member

Is the milestone correct for this pull request?

@aaronweeden aaronweeden changed the base branch from main to xdmod11.0 November 25, 2024 19:47
@aaronweeden aaronweeden force-pushed the fix-execute-sql-exception branch from 73856ae to 63e6808 Compare December 2, 2024 20:10
@aaronweeden aaronweeden force-pushed the fix-execute-sql-exception branch from 15a7396 to 9fcc6d3 Compare February 4, 2025 20:37
@aaronweeden aaronweeden merged commit 139042a into ubccr:xdmod11.0 Feb 4, 2025
@aaronweeden aaronweeden deleted the fix-execute-sql-exception branch February 4, 2025 21:35
aaronweeden added a commit to aaronweeden/xdmod that referenced this pull request Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugfixes Category:ETL Extract Transform Load php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants