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

Add missing endpoint to exception message in ExecuteSql. #1929

Open
wants to merge 1 commit into
base: xdmod11.0
Choose a base branch
from

Conversation

aaronweeden
Copy link
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
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
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.

2 participants