Vorschläge max.2 pro Tag

Platz für Vorschläge, Fragen, Anderes

Wenn sie Antworten erhalten wollen tragen sie hier Kontaktdaten wie email-Adresse oder Telefonnummer oder Postanschrift ein

Sicherheitscheck: Tragen sie die abgebildeten Buchstaben und/oder Zahlen hier unter in das freie Feld ein.
Enter the characters shown in the image.

Linux - here we go


Wie gefällt euch/ihnen diese Seite:

Vorschläge und Wünsche bitte an: support@webjoke.de.


Sicherheitscheck: Tragen sie die abgebildeten Buchstaben und/oder Zahlen hier unter in das freie Feld ein.
Enter the characters shown in the image.

Drupal Association blog: Women’s History Month Spotlight: Anneleen Demasure

Drupal News - Do, 03/23/2023 - 16:24

It’s Women’s History Month, and all month long, we’ve been spotlighting incredible women in Tech on our Twitter and Linkedin page. Today, we’re bringing you an extended highlight of one of the most impressive women in tech today – Anneleen Demasure, CEO of Belgium-based digital experience agency Dropsolid.

Read on to hear Anneleen’s thoughts on being a woman in technology and her advice for other women who want to enter the field!

Drupal Association: What's it like to be a woman in technology?
Anneleen Demasure:
Good question, as I do not think it is about woman versus man or about technological versus creative industries. For me, it is all about balance between male and female energy. The world these days is so complex that it needs both male and female energy.
I am most enjoying my time as a woman in technology when all different energies can flow in respect of each other. When my own male and female energy is in balance and stress is under control, I feel I can support the team and the company best, and that makes me happy.
I am lucky to work in a technological company, Dropsolid, where there is openness, transparency and both female and male energy on all levels which makes it much easier to address unbalances.

DA: What keeps you motivated in your career in technology?
AD: An important starting point for me is the psychological safety to be yourself at any time. Everyone has talents and personal strengths, but all strengths also have downsides to them. Feeling appreciated with your ups and your downs is crucial to flourish.
Next to that, the autonomy and freedom to be allowed to change things, the connection with colleagues, and making progress together keeps me motivated.
Often in technology, you're building something big together: when a team succeeds in doing that, it surely gives a boost.

DA: What's your favorite aspect of working in tech and/or Drupal?
I guess what is precious to me is the feeling of jointly creating and developing something new which makes a customer happy (because it is of important value to them).
The co-creation, the joy of working together, and the impact are my favourite aspects of working in tech.
Too often, we see technology as wireframes or code or design where, in the end, they are (vital) solutions for people to be helped, to be heard, to find their way, to be unburdened...
All good technology should have this bigger purpose: a housing platform helps people to find a new home, a hospital platform helps people to find the right medical services, a tourism platform inspires you for your next holiday... So it is not about the perfect code or design but about what it brings to people in their daily life. At Dropsolid, Drupal is the means to accomplish this. And the fact that it's open without lock-in, makes it even better.

DA: What advice do you have for aspiring women business leaders?
Whatever situation or crisis you're in, never lose your female energy as one of your drivers. We are dominantly trained and learned to take action and talk, but it often helps to step back and listen to yourself and to others. Finally, always trust your inner voice - it will not betray you.

We cannot thank Anneleen enough for chatting with us and giving such fantastic advice! For more from Anneleen, check out her recent blog post on Dropsolid.com, ‘A plea for wider inclusion and more feminine energy’.

Kategorien: Drupal News

Lemberg Solutions: How the Lemberg Solutions Team Contributes to Drupal

Drupal News - Do, 03/23/2023 - 13:34
Contributing code back to the community is essential to Open Source software. Without this mindset, we wouldn't have a variety of Linux distributions, Content Management Systems like WordPress or Drupal, and many other tools and services. Finding a balance between paid work and personal time for your initiatives and pet projects is challenging, but it converts into valuable things used by thousands of people in the future. That's why, at Lemberg Solutions, we support Open Source initiatives and motivate our developers to contribute code whenever possible
Kategorien: Drupal News

Opensource.com: How to encourage positive online communication in your open source community

Drupal News - Do, 03/23/2023 - 09:00
How to encourage positive online communication in your open source community ultimike Thu, 03/23/2023 - 03:00

The Drupal community uses nudges to keep conversations productive and inclusive.

Threaded online conversations are a relatively new form of communication that can improve knowledge transfer and availability, but they can also stray from the original intent…

rcheesley AmyJune
Kategorien: Drupal News

Axelerant Blog: Drupal 7 End Of Life: A Guide To Next Steps

Drupal News - Mi, 03/22/2023 - 13:36

Drupal 7, launched over a decade ago, is reportedly used by 52.2% of all websites using Drupal. But irrespective of this substantial user base, Drupal 7 will reach its End Of Life (EOL) on 28 November 2023, which means it will no longer get security updates or bug fixes.

Kategorien: Drupal News

The Drop Times: Jayesh Is No More; Goodbye, Dear Friend, Colleague

Drupal News - Mi, 03/22/2023 - 08:53
Team TheDropTimes bid adieu to our deceased copy editor, Jayesh S (43). He succumbed to a cardiac arrest on March 22, 2023, 6:00 am IST. Jayesh was hospitalized following a head injury due to an accidental fall.
Kategorien: Drupal News

Axelerant Blog: Why Did I Choose To Remain At Axelerant For Three Years

Drupal News - Mi, 03/22/2023 - 06:33

This article narrates why I—an engineer in the prime growing stage of my career—chose to remain with Axelerant, even though having opportunities to join multinational companies that most people aspire for.

Kategorien: Drupal News

Chapter Three: A Redesign in Support of Children's Health

Drupal News - Di, 03/21/2023 - 18:33
The California Children's Hospital Association (CCHA) is a membership organization that champions children's health, well-being and quality of care in California's children's hospitals. Like many non-profit organizations, the team at CCHA is busy and focused on its programs and policy advocacy, so their website must be both an effective communicator and easy to manage and grow. To do that, this project had a few key measures of success: 1. Make the editorial experience much easier 2. Introduce related content between news and programs to allow one step publishing across the site 3. Create a new design that incorporates repeatable graphic components for page creation, thoughtful images and a softer palette of colors and patterns.
Kategorien: Drupal News

Matt Glaman: Using the bundle specific list cache tag for entity types

Drupal News - Di, 03/21/2023 - 15:18

In a previous blog post, I explained the list cache tag for entity types, which you use when displaying a list of entities. This cache tag ensures that appropriate render caches and response caches are invalidated whenever a new entity is created, or an existing one is saved. One problem is that the {ENTITY_TYPE}_list cache tag is generic for all entities of that entity type. Invalidating it can cause a lot of cache churn for a large site with heavy activity.

What problem does a bundle-specific list cache tag solve?

Imagine a simplistic site with two content types: "Pages" (page) and "Blog posts" (blog_post.) We will also have the following assumptions:

Kategorien: Drupal News

Specbee: What You Need To Know About Continuous Integration and Testing in Drupal

Drupal News - Di, 03/21/2023 - 10:34
What You Need To Know About Continuous Integration and Testing in Drupal Shubham Gaur 21 Mar, 2023 Subscribe to our Newsletter Now Subscribe Leave this field blank

Drupal is a rapidly growing content management system (CMS). It has 1.3 million users, which is increasing daily. This platform helps in creating different websites, intranets, and web applications. Drupal is a widely used application because it integrates with Continuous Integration and Continuous Testing (CI/CT) tools, which have numerous benefits.

This blog will discuss everything about CI/CT and Drupal.

Importance of Continuous Integration

Continuous testing makes sure that the testing process is easy and automatic. It integrates code changes into a shared repository. Addresses the issue early in the development process and makes finding and removing bugs from the software easier.

Integration is a very important part of the software development method. Here, members of the team have to perform multiple integrations every day. An automated build is used to check those integrations. This automation build includes a test for detecting integration errors faster.

CI helps in testing, reviewing, and integrating the changes into the codebase more quickly and efficiently. Working on isolated code branches can cause several issues. CI prevents those issues and reduces the risk of a merge conflict.

Benefits of Continuous Integration

Continuous Integration is used in Drupal development for a variety of reasons. Some of them are given below.

The key benefits of Using Continuous Integration are:

● Build Automation and Self-testing

Automated environments help in building and launching the system using a single command. Whereas self-testing makes detecting and eradicating the bugs much easier.

● Daily Commits and Integration machine

It is recommended for developers to commit to the machine every day. This way, build tests will be passed immediately, and the correct code will be generated. Integration machines require regular builds and successful build integration.

● Immediate Fix of broken builds and rapid feedback

Continuous build is done to fix the issues in the mainline build immediately. Also, it is necessary to keep the build fast and provide rapid feedback.

● State of the system and Deployment automation

The working of the system should be visible to everyone. The alterations that have been made must be visible to every team member. Deployment automation requires the testers and developers to have scripts. These scripts will help them deploy the application easily into different environments.

How Does Continuous Integration Work?

There are several steps that developers need to follow for successful integration. Alterations must be committed to the repository, and the codes must be thoroughly checked. Developers’ private workspaces must look over the code.

CI server is used to check alterations and build the system. The server runs unit and integration tests and alerts the team members if the build tests fail. The team members fix the issue and continue to test and integrate the project.

The four key steps of CI are code, build, test, and deploy.

  1. Developers write code and commit changes to a shared code repository.
  2. A CI server monitors the code repository for changes, and when changes are detected, the server checks out the latest code and builds the software.
  3. The CI server runs automated tests on the built software to verify that the code changes have introduced no bugs or broken any existing functionality.
  4. If the tests pass, the CI server may deploy the code changes to a staging or production environment, depending on the organization's release process.

CI typically involves using a version control system (such as Git or SVN) to manage code changes and a build server (such as Jenkins, Travis CI, or CircleCI) to build and test the code changes. Automation testing is critical to CI, enabling developers to catch and fix bugs introduced by code changes quickly.

By catching problems early in the development process, CI can help teams to reduce the time and cost of software development while also improving the quality and reliability of the software being produced.

What Are The Continuous Integration Tools?

Many Continuous Integration (CI) tools are available, each with strengths and weaknesses. Here are some of the most popular CI tools used by software development teams:

● Jenkins

This is a popular open-source CI tool with a large user community. It can be easily customized with plugins and has integrations with many other tools.

● Travis CI

This cloud-based CI tool is popular for its ease of use and seamless integration with GitHub.

● CircleCI

This cloud-based CI tool is popular for its speed and scalability. It also integrates with many other tools, such as Docker and AWS.

● GitLab CI/CD

This is a built-in CI/CD tool within GitLab, a popular Git repository management system. It is open source and has integrations with many other tools.

● Bamboo

This is a CI/CD tool from Atlassian, the makers of JIRA and Confluence. It has integrations with many other Atlassian tools, as well as other third-party tools.

● TeamCity

This is a CI tool from JetBrains, the makers of IntelliJ IDEA, and other IDEs. Its adaptability and simplicity make it appealing.

● Azure DevOps

This is a cloud-based CI/CD tool from Microsoft. It integrates with many other Microsoft tools, such as Visual Studio and GitHub.

These are just a few of the many CI tools available. When choosing a CI tool, its important to consider factors such as ease of use, integrations with other tools, cost, and the size and complexity of the development team.

Key Practices That Form An Effective Continuous Integration

Here are some key practices that form an effective Continuous Integration (CI) process:

Version Control

A CI process starts with version control, essential for managing code changes, resolving conflicts, and collaborating effectively. Git, SVN, and Mercurial are popular version control systems.

Automated Build

In a CI process, code is always committed to the version control system. It triggers an automated build process to compile and package the code. This ensures that the code builds successfully and eliminates any manual errors.

Automated Testing

Automated testing is a critical component of a CI process. Tests should be automated so that they can be run every time code is committed, and they should cover both functional and non-functional aspects of the application.

Continuous Feedback

CI provides continuous feedback to developers through automated build and test processes. Any issues or failures should be identified and reported immediately to be addressed promptly.

Continuous Deployment

Automated deployment can help reduce the time to get code into production and ensure that the deployment process is consistent and reliable.

Continuous Improvement

A CI process should be constantly monitored and improved. This includes reviewing build and test results, identifying and addressing issues, and optimizing the process to make it faster and more effective.

Effective communication and collaboration among team members are essential for a successful CI process. Developers, testers, and operations personnel should work together closely to identify issues and resolve them quickly.

By following these key practices, teams can implement an effective CI process that helps to ensure high-quality software development and deployment.

What Is Continuous Integration For Drupal?

Continuous integration (CI) for Drupal involves regularly integrating code changes from multiple developers into a shared code repository, building and testing the code changes, and automatically deploying the changes to a testing or staging environment.

Here are some of the key benefits of implementing CI for Drupal:

● Reduced risk

By regularly integrating and testing code changes, CI can help catch and fix errors early in the development cycle, reducing the risk of introducing bugs or breaking functionality.

● Improved collaboration

Developers can collaborate more easily and effectively by working from a shared code repository.

● Faster feedback

With automated testing, developers can get feedback on their code changes quickly, enabling them to make corrections and improvements more rapidly. Different cloud-based testing platforms like LambdaTest can help you achieve faster feedback on code
commits and get a quicker go-to-market.

LambdaTest is a digital experience testing cloud that allows organizations and enterprises to perform manual and automated testing for web and mobile. It offers different offerings like real-time testing, Selenium testing, Cypress testing, Appium testing, OTT testing, testing on real device cloud, and more.

LambdaTest’s online device farm lets you test at scale across 3000+ real browsers, devices, and OS combinations. It also integrates with many CI/CD tools like Jenkins, CircleCI, and Travis CI.

● Consistency

By using consistent tools and processes for development, testing, and deployment, teams can ensure that all code changes are properly vetted and tested before they are deployed to production.

Implementing CI and Testing In Drupal

Like many web application frameworks, Drupal can benefit from continuous integration (CI) and testing practices. Here are some general steps that can be taken to implement CI and test in Drupal:

  1. Set up a version control system (VCS) such as Git or SVN to manage code changes. All developers should be encouraged to commit their changes to the VCS regularly.
  2. Use a continuous integration (CI) tool such as Jenkins, Travis CI, or CircleCI to automatically build and test Drupal code changes whenever they are committed to the VCS.
  3. Write automated Drupal tests using a framework like PHPUnit or Behat. Tests should cover both functional and non-functional aspects of the application.
  4. Configure the CI tool to run automated tests whenever new code changes are detected. If any tests fail, developers should be notified immediately so they can fix the issue.
  5. Use tools like CodeSniffer and PHPMD to check for violations of coding standards and best practices.
  6. Consider using tools like Docker or Vagrant to help automate the setup and configuration of development environments and ensure consistency across development, testing, and production environments.
  7. There are also contributed modules available for Drupal that can help with testing, such as SimpleTest or the Drupal Extension for Behat.
Final Thoughts

To implement CI for Drupal, development teams can use various tools like Jenkins, Travis CI, or CircleCI and write automated tests using a testing framework such as PHPUnit or Behat. They can also use tools like Docker or Vagrant to help automate the setup and configuration of development environments and ensure consistency across development, testing, and production environments.

Additionally, contributed Drupal modules are available, such as SimpleTest or the Drupal Extension for Behat, which can help test Drupal-specific functionality. By implementing continuous integration and testing practices in Drupal, developers can catch and fix issues early in the development process, leading to faster, higher-quality development and Deployment.

Guest Author: Shubham Gaur

Shubham Gaur is a freelance writer who writes on the fundamentals and trends of Software testing. With more than 5 years of experience in writing on different technologies, he explains complex and technical testing subjects in a comprehensive language.

Email Address Subscribe Leave this field blank Software Testing Drupal Module Drupal Drupal Planet

Leave us a Comment

  Recent Blogs Image What You Need To Know About Continuous Integration and Testing in Drupal Image Mastering Drupal 9 Layout Builder: A Comprehensive Guide to Effortlessly Customize Your Website's Design Image How to Efficiently Fetch Drupal Reference Entities in Custom Modules Want to extract the maximum out of Drupal? TALK TO US Featured Case Studies

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology


A Drupal powered multi-site, multi-lingual platform to enable a unified user experience at SEMI


Great Southern Homes, one of the fastest growing home builders in the US, sees greater results with Drupal

View all Case Studies
Kategorien: Drupal News

Axelerant Blog: What Is Salesforce Integration? An Introduction

Drupal News - Di, 03/21/2023 - 09:50

The Salesforce platform makes creating engaging customer and employee experiences with third-party data integrations easier. Experts can combine a composable architecture with building a unified view of all customers. When used strategically, robust tools and powerful APIs can dramatically reduce integration time and unlock modernized back-office systems.

Kategorien: Drupal News

Talking Drupal: Talking Drupal #391 - Building Your Career

Drupal News - Mo, 03/20/2023 - 20:00

Today we are talking about Building Your Career with Mike Anello.

For show notes visit: www.talkingDrupal.com/391

  • How we started our careers
  • Broad career opportunities
  • Mentorship
  • Roles
  • First step after graduating
  • First step in switching
  • Common hurdles
  • Resources like Drupal Easy
  • Value of a career in Drupal
  • How do you find jobs
  • How do you build and maintain your Drupal career
  • How about your Drupal resume
  • Any advice
Resources if (class_exists('Kint')) { // Set the max_depth to prevent out-of-memory. \Kint::$max_depth = 4; } Guests

Mike Anello - Drupal Easy @ultimike


Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Jacob Rockowitz - www.jrockowitz.com @jrockowitz

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Devel Debug Log Allows developers to inspect the contents of variables. If those are classes you can inspect nested properties and all methods available.

Kategorien: Drupal News

The Drop Times: To Become a Hedgehog

Drupal News - Mo, 03/20/2023 - 18:53

Last week, TheDropTimes (TDT) was able to publish two interviews. In one of those interviews, Holmes Consulting Group founder Robbie Holmes mentioned a concept. 

Many management professionals might know and practice it. But for me, it was new. I am not a management guy, and such concepts seldom graced my reading list. Listening to what others say has helped me, and I can also say the same about watching Alethia’s interview with Robbie. 

The concept he shared is not new. Isaiah Berlin proposed it in his 1953 essay, ‘The Hedgehog and the Fox: An Essay on Tolstoy’s View of History’; later, Jim Collins developed it in his book, ‘Good to Great: Why Some Companies Make the Leap, and Others Don’t.’ The core theme of this book is that greatness is not primarily a function of circumstance but largely a matter of conscious choice and discipline.

How Jim Collins describes the hedgehog concept intrigued me. He begins with Berlin’s adaptation of the ancient greek parable, “The fox knows many things, but the hedgehog knows one big thing.” Jim tries to teach us how to find that one big thing. It is by placing your business in the intersectional area of three thought circles:

  1. What you are deeply passionate about.
  2. What you can be the best in the world at.
  3. What drives your economic or resource engine. 

Jim explains that transformation from good to great comes about by a series of good decisions made consistently with a Hedgehog Concept, supremely well executed, accumulating one upon another over a long period. 

Pardon my audacity in pushing this concept again. But what I saw after going through it is that we at TDT can excel in creating more and more good-to-great interviews with the fantastic people working around Drupal and related projects with your active help. Also, we urge the Drupal agencies to find their one big thing and excel in it. 

As I mentioned, you can watch our interview video with Robbie Holmes here. The other interview we published last week was with Chris Wells, the co-lead of Project Browser Initiative. Chris is the founder of Redfin Solutions. You can read the interview here. We made both conversations as part of DrupalCamp NJ

As for other stories from last week, here are a comprehensive list:

Drupal Developer Days Vienna has started accepting session proposals. MidCamp is happening next month, and here is how you can help organize the campOpenSource North Conference has announced the lineup of speakers. Drupal Netherlands opened the sale of early bird tickets for Drupaljam 2023 in June. You may submit sessions to DrupalCon Lille until April 24. Drupal Camping Wolfsburg treats all sponsors as gold sponsorsDrupalSouth Wellington has put out a call for volunteers. You can submit sessions for DrupalCamp Asheville 2023 until April 25. Both DrupalCamp NJ and NERD Summit are over. DrupalCon Pittsburgh is looking for a launch sponsor or co-working space sponsor. 

Drupal Community Working Group has asked Drupalers to nominate candidates for Aaron Winborn Award 2023, and you have only five more days to do that. Kanopi and Pantheon have announced a joint webinar on Drupal 7 to 10 migration. Salsa Digital has started a blog series on ‘Rules as code insights.’ SFDUG is hosting a Technical Writing Workshop on April 13. We revisited a blog post from HTML Panda from May 2022, comparing WordPress and Drupal. A Drupal distribution focussed on the publishing industry, ‘Thunder CMS 7’ based on Drupal 10, published its beta release. Von Eaton, Director of Programs in Drupal Association, addressed the ‘Back to Work for Women’ program conducted by ICFOSS and supported by Zyxware. 

That is for the week, folks; thank you. 

Sebin A. Jacob

Kategorien: Drupal News

Consensus Enterprises: Kubernetes backend for Aegir5

Drupal News - Mo, 03/20/2023 - 16:00
Aegir5 and Kubernetes Lately we’ve been working with clients ranging from large Canadian government departments to small commercial SaaS companies, who have asked us to deploy CMS apps to Kubernetes (K8S) clusters running on Openstack. In spite of our continued feeling that most of the time Kubernetes Won’t Save You, we’ve found it to be surprisingly useful in certain contexts. In fact, we’ve started to think that K8S will prove an extremely valuable backend to plug in to our existing Aegir5 front-end and queue system.
Kategorien: Drupal News

Axelerant Blog: 5 Best Test Management Tools For Jira In 2023

Drupal News - Mo, 03/20/2023 - 13:47

Choosing a team's new Jira test management tool can be challenging, as one needs to consider a few key factors. The ideal test management tool should include test automation and observation testing. It should be easy to use, have robust test management capabilities, and have an efficient user interface.

Kategorien: Drupal News

Opensource.com: Create accessible websites with Drupal

Drupal News - Mo, 03/20/2023 - 09:00
Create accessible websites with Drupal neerajskydiver Mon, 03/20/2023 - 03:00

Use the open source Drupal CMS to create accessible websites that provide open access to everyone.

As the world becomes increasingly digital, it’s more important than ever to ensure that websites are accessible to everyone. Accessibility is about designing websites that can…

Kategorien: Drupal News

Ben's SEO Blog: The Metatag Module

Drupal News - Sa, 03/18/2023 - 01:19
The Metatag Module Set up your Drupal site's meta tags along with specifying how your social media will appear when linking to pages, along with Schema information in one powerful Drupal module. Anonymous (not verified) Fri, 03/17/2023 - 18:19
Kategorien: Drupal News

Ben's SEO Blog: How to Add Default Metatags for a Specific Content Type

Drupal News - Sa, 03/18/2023 - 00:43
How to Add Default Metatags for a Specific Content Type

So you've got your Metatag module installed and defaults configured for the Global, Front page, and Content. However, you want slightly different meta tags for several of your content types. Here's how you do that.

Tracy Cooper Fri, 03/17/2023 - 17:43
Kategorien: Drupal News

Ben's SEO Blog: How to Add Meta Tag Fields to Your Content Types in Drupal

Drupal News - Fr, 03/17/2023 - 23:50
How to Add Meta Tag Fields to Your Content Types in Drupal

So you have your Meta tag module installed and all the default meta tags configured. However, you still need to tweak the meta tags for a specific page, but the meta tag fields aren't showing up in the edit interface. Here's how to get those to show up for the various content types.

Go to Manage > Structure > Content Types. This displays the Content types listing page. 

Tracy Cooper Fri, 03/17/2023 - 16:50
Kategorien: Drupal News

Wim Leers: High concurrency Composer

Drupal News - Fr, 03/17/2023 - 17:45

On behalf of Acquia I’m currently working on Drupal’s next big leap: Automatic Updates & Project Browser — both are “strategic initiatives”.

In November, I started helping out the team led by Ted Bowman that’s been working on it non-stop for well over 1.5 years (!): see d.o/project/automatic_updates. It’s an enormous undertaking, with many entirely new challenges — as this post will show.

For a sense of scale: more people of Acquia’s “DAT” Drupal Acceleration Team have been working on this project than the entire original DAT/OCTO team back in 2012!

The foundation for both will be the (API-only, no UI!) package_manager module, which builds on top of the php-tuf/composer-stager library. We’re currently working hard to get that module committed to Drupal core before 10.1.0-alpha1.

Over the last few weeks, we managed to solve almost all of the remaining alpha blockers (which block the core issue that will add package_manager to Drupal core, as an alpha-experimental module. One of those was a random test failure on DrupalCI, whose failure frequency was increasing over time!

A rare random failure may be acceptable, but at this point, ~90% of test runs were failing on one or more of the dozens of Kernel tests … but always a different combination. Repeated investigations over the course of a month had not led us to the root cause. But now that the failure rate had reached new heights, we had to solve this. It brought the team’s productivity to a halt — imagine what damage this would have done to Drupal core’s progress!

A combination of prior research combined with the fact that suddenly the failure rate had gone up meant that there really could only be one explanation: this had to be a bug/race condition in Composer itself, because we were now invoking many more composer commands during test execution.

Once we changed focus to composer itself, the root cause became obvious: Composer tries to ensure the temporary directory is writable and avoids conflicts by using microtime(). That function confusingly can return the time at microsecond resolution, but defaults to mere millisecondssee for yourself.

With sufficiently high concurrency (up to 32 concurrent invocations on DrupalCI!), two composer commands could be executed on the exact same millisecond:

// Check system temp folder for usability as it can cause weird runtime issues otherwise Silencer::call(static function () use ($io): void { $tempfile = sys_get_temp_dir() . '/temp-' . md5(microtime()); if (!(file_put_contents($tempfile, __FILE__) && (file_get_contents($tempfile) === __FILE__) && unlink($tempfile) && !file_exists($tempfile))) { $io->writeError(sprintf('PHP temp directory (%s) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini', sys_get_temp_dir())); } }); — src/Composer/Console/Application.php in Composer 2.5.4

We could switch to microtime(TRUE) for microseconds (reduce collision probability 1000-fold) or hrtime() (reduce collision probability by a factor of a million). But more effective would be to avoid collisions altogether. And that’s possible: composer always runs in its own process.

Simply changing sys_get_temp_dir() . '/temp-' . md5(microtime()); to sys_get_temp_dir() . '/temp-' . getmypid() . '-' . md5(microtime()); is sufficient to safeguard against collisions when using Composer in high concurrency contexts.

So that single line change is what I proposed in a Composer PR a few days ago. Earlier today it was merged into the 2.5 branch — meaning it should ship in the next version!

Eventually we’ll be able to remove our work-around. But for now, this was one of the most interesting challenges along the way :)

Kategorien: Drupal News