Skip to content

fix(base/db): pass database connection to get_machine_info#3700

Merged
infotroph merged 1 commit intoPecanProject:developfrom
AritraDey-Dev:fix/missing-db-params
Dec 5, 2025
Merged

fix(base/db): pass database connection to get_machine_info#3700
infotroph merged 1 commit intoPecanProject:developfrom
AritraDey-Dev:fix/missing-db-params

Conversation

@AritraDey-Dev
Copy link
Member

Description

Currently, any function using convert_input fails with the following error because get_machine_info is missing a database connection:

 2025-12-05 13:08:14.404217 DEBUG  [PEcAn.DB::convert_input] : 
   No existing record found. Should be good to go. 
2025-12-05 13:08:14.405256 SEVERE [db.query] : 
   No parameters or connection specified 
Error: Process completed with exit code 1.

This PR passes the existing database connection con to get_machine_info within convert_input.R to resolve this error.

Motivation and Context

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

It will fix the issue of 'No parameters or connection specified' while convert_input

Signed-off-by: Aritra Dey <adey01027@gmail.com>
@infotroph
Copy link
Member

Thank you for the patch!

Caution for future readers with superficially similar issues: This fixes a failure in cases where your run has an active DB connection. Making convert_input work right in the increasingly common case where the DB is not available (so con is NULL) will be a separate and larger task.

@infotroph infotroph added this pull request to the merge queue Dec 5, 2025
Merged via the queue into PecanProject:develop with commit f60dadd Dec 5, 2025
20 of 27 checks passed
@AritraDey-Dev AritraDey-Dev deleted the fix/missing-db-params branch December 5, 2025 18:25
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.

3 participants