Urgent.News

What's breaking now, across thousands of outlets.

Tech

'Deploy succeeded.' Four of my nine pages were still 404.

I deployed nine new pages this week. The CLI said what it always says: ✨ Success! Uploaded 14 files Deployed (5.61 sec) Twenty seconds later I checked the actual URLs, because someone in a thread here had spent six rounds teaching me not to trust a report about the wrong thing: synology - htaccess - does - nothing 404 php - 74 - str - starts - with - fatal - error 200 pwa - still - showing - old…

Abstract editorial illustration

On a particular day this week, I made nine new pages and utilized a CLI tool to deploy them. The tool responded with a message confirming the success of the upload, stating the process took only 5.61 seconds to complete. However, upon checking the actual URLs, I discovered that four of the nine pages were still not accessible, displaying a 404 error.

Initially, I found it problematic when only four out of nine pages were accessible after deployment. I realized that the deploy tool only confirms the successful completion of the upload and acceptance by the platform, but it doesn't provide any information about the accessibility of the pages. This realization led me to consider the questions the tool can answer versus the questions I needed to know the answer to.

The issue stemmed from trusting the deploy tool's report without verifying the actual accessibility of the pages. I learned that the deploy tool only confirms whether the upload was completed and accepted, but it doesn't indicate whether the pages are reachable or if what is live matches my expectations. It's crucial to recognize that the tool provides a narrow answer to one specific question and may not address all the concerns I had.

To overcome this limitation, I decided to take additional steps. I built a script that deliberately refuses to produce a result when it cannot reach enough of its data. The script performs tests and reports what it missed, providing an exit status of 1 if the test fails. This approach helped me identify that only 28% of the records were reached, and the process exited with status 1. By running this script, I was able to detect that the deployment was not as successful as initially thought.

Furthermore, I implemented a monitoring technique to check the accessibility of the pages after deployment. I scheduled a loop that repeatedly checks the HTTP status code of each page. If any page returns a status code other than 200, indicating a 404 error, the script identifies it as a propagation issue rather than a broken build. This approach allowed me to differentiate between a failed deployment and a situation where the pages simply hadn't propagated yet.

By asking the right questions and verifying the accessibility of the pages, I gained a more accurate understanding of the deployment's success. The lesson learned is that relying solely on the deploy tool's report can lead to misinterpretation of the results. It is essential to ask additional questions, verify the actual accessibility of the pages, and obtain information from sources outside the control of the deployment process.

This approach ensures a more comprehensive understanding of the deployment's outcome and helps avoid false conclusions based on incomplete information.

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

Also reported by 1 other outlet

Read the original at dev.to →

More in Tech

Turning TravelAI.Core Into a Real Production System

A few months ago I published TravelAI.Core, a .NET library for searching travel destinations using AI. Version 2.0.0 shipped with support for OpenAI, Anthropic, Azure OpenAI, and Ollama. It works. People are using it. But it's still just a library. One package, doing one job, called directly from your code.

More from Sunday 2 August →