Skip to content

Ensure DATABRICKS_HOST starts with https for API calls#140

Draft
cjrace wants to merge 3 commits into
mainfrom
fix/139-https-write-delta
Draft

Ensure DATABRICKS_HOST starts with https for API calls#140
cjrace wants to merge 3 commits into
mainfrom
fix/139-https-write-delta

Conversation

@cjrace

@cjrace cjrace commented May 12, 2026

Copy link
Copy Markdown
Contributor

[Disclaimer, used GitHub Copilot's agent mode locally in Positron to raise this, wanted to test how well it could autonomously pick up an issue and raise a fix - it wasn't as smooth as Claude Code, and GPT-4.1 definitely feels a step down from the latest other models, but seems like there's some potential here]

Brief overview of changes:

  • Ensures DATABRICKS_HOST is always normalised to include "https://" for API calls.
  • Creates a utility in utils.R with internal documentation that checks for the databricks host, handles errors if missing and normalises the https::
  • Updates all relevant API helpers to use the utility.
  • Clarifies documentation for end users.
  • Adds tests for the normalization utility.
  • Fixes lint / style issues.

Why are these changes being made?

To resolve issue #139 and ensure robust, user-friendly handling of Databricks host configuration.

Checklist

  • I have read the contributing guidelines
  • The code follows the package style and naming conventions
  • All new and existing tests pass
  • Documentation updated
  • Lint / style issues resolved

Issue ticket number and link

Fixes #139

Additional info - prompts used

@github /fix #139 Review this issue and propose a implementation plan. Do not write code yet, just summarize the approach.

This looks good. Implement these changes on a new branch named 'fix/139-https-write-delta'. Run the tests after applying the fix using devtools::check() in an R session. Do not commit any changes

Move the utility function into the utils.R file. Add documentation for it though ensure that no Rd file is created and the function is marked as internal only. Proceed with updating any other relevent documentation, making the behaviour clear to end users of the package, and update tests as appropriate for this change.

Remove the changes to the README.Rmd, they are unnecessary, run linting tests using devtools::load_all(); lintr::lint_package(), fix as needed and then commit and raise a draft PR with a suitable description following the PR template in this repo.

I didn't have gh CLI installed for it to raise the PR itself, so I've done that here using the text outputted in the chat pane (with the addition of the prompts for sight).

After the initial PR I did then go away and fix it up myself, including undoing additional styling changes beyond the scope of this PR.

… to utils.R; clarify docs; add tests; lint fixes
@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.82927% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.04%. Comparing base (8d62b77) to head (6a6a74e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
- Coverage   57.19%   57.04%   -0.15%     
==========================================
  Files          18       18              
  Lines        1509     1532      +23     
==========================================
+ Hits          863      874      +11     
- Misses        646      658      +12     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d62b77...6a6a74e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[Bug]: write_df_to_delta() fails to connect to the server if the host url doesn't start with "https://"

1 participant