Urgent.News

What's breaking now, across thousands of outlets.

Tech

Our integration tests skipped themselves on every Dependabot pull request

In April our checkout started failing for every customer who paid by bank transfer. The cause was a minor version of our payment provider's SDK, merged automatically two days earlier, which had renamed a field in the response we read to get the transfer reference. Our integration suite calls the provider's sandbox and reads exactly that field. It had passed on the pull request. Or rather, it had…

In April, our checkout system began failing for customers who paid by bank transfer. The root cause was a minor update to our payment provider's SDK, which had accidentally renamed a field in the response we used to obtain the transfer reference. Our integration tests were supposed to call the provider's sandbox and read that specific field, but after the update, they failed.

We had Dependabot set up to automatically open pull requests for dependency updates, and a workflow was enabled to auto-merge patch and minor versions once the necessary checks passed. The integration tests require a sandbox API key, which is stored as an Actions secret. Years ago, a developer had implemented a pytest skipif statement to skip the tests when the key was missing, allowing developers without access to still run the suite on their local machines.

GitHub runs workflows triggered by Dependabot as if the pull request originated from a fork. The GITHUB_TOKEN is read-only, and Actions secrets are not passed along with the run. Dependabot has its own secret store for this very reason, and we had not previously added any secrets to it. Consequently, on every Dependabot pull request, the sandbox API key was empty, causing all forty-two integration tests to report "skipped." The pytest suite then exited with a zero status, and the check was marked as green.

This situation had persisted for eighteen months, leading us to merge every dependency update based solely on the results of the unit tests. Nobody noticed the issue because skipped tests appear in grey on a page that is rarely visited when the green check mark is present. We quickly reverted the SDK to its previous version, and transfers were restored to working order within an hour. We also updated the sandbox API key to be a Dependabot secret to prevent this issue from recurring.

To catch this problem moving forward, we modified the integration job to include a final step that failed the job if more than two tests were skipped. Additionally, the auto-merge process now requires the job summary to be reviewed, rather than just checking the green status of the pull request. This change aims to ensure that tests that intentionally skip themselves, indicating their results are not valid for a particular run, are properly accounted for.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Termux custum Copy code Output to Clipboard

📋 Stop Copying Terminal Output Manually! Meet ca , a Clipboard Shortcut for Termux Tags: #android #termux #bash #opensource If you use Termux on Android to write code, run scripts, manage Git…

  • Bash utility 'ca' copies terminal output to Android clipboard
  • Captured output appears in Termux and is simultaneously copied
  • Allows users to paste results directly into other applications

A professional-grade website for under $5 a month

How I run my wife's clinic website https://naturlaskin.clinic on AWS with security, automation and the Well-Architected Framework built in from day one My wife runs a natural skin clinic.

  • Website costs under $5/month on AWS
  • Includes 20+ pages, blog, booking system
  • Admin editor for wife with password protection

I Looked at Countdown Timers as a Shopper and a Web Developer

I noticed something about the way I shop online: when a website tells me an offer is about to expire, I suddenly feel like I need to make a decision.

  • Countdown timers trigger urgency, prompting quick action in online shoppers
  • Web developers implement timers to highlight deadlines and motivate decisions
  • Accurate deadlines and genuine value are crucial for effective countdown timers

I Built a Faceless Video Factory That Remembers Which Content Pays

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built Faceless Video Factory is a local-first pipeline that turns a single topic into a finished vertical…

  • Inventor built a faceless video factory that learns profitable content
  • Uses Backboard's persistent memory and RAG for video creation
  • Recalls earnings data to choose next topic and store outcomes

More from Thursday 15 October →