oliverdavies.uk/content/node.86c57486-ce6b-45ae-b953-2f15ae8cf0cb.json
2025-05-30 02:34:52 +01:00

100 lines
No EOL
5.2 KiB
JSON

{
"uuid": [
{
"value": "86c57486-ce6b-45ae-b953-2f15ae8cf0cb"
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
"value": "2025-05-11T09:00:30+00:00"
}
],
"revision_uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"revision_log": [],
"status": [
{
"value": true
}
],
"uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"title": [
{
"value": "Feature flags enable continuous integration\n"
}
],
"created": [
{
"value": "2023-09-28T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-05-11T09:00:30+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2023\/09\/28\/feature-flags-enable-continuous-integration",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>I was recently working on a feature over a few mob programming sessions.<\/p>\n\n<p>After the session, we implemented part of the feature but couldn't merge it as it wasn't complete.<\/p>\n\n<p>After working on other things that day, I'd need to rebase my local commits and push the last-but-one commit to the remote repository to keep the incomplete feature only in my local repository (I forgot a few times and almost pushed it accidentally).<\/p>\n\n<p>The commit prevented me from following continuous integration - where everyone commits and pushes their code a minimum of once daily.<\/p>\n\n<p>What if someone else wanted to look at that code between mob sessions? They couldn't, as it was only on my laptop.<\/p>\n\n<p>If I'd made a temporary branch, it would be outdated and behind other changes to our mainline branch.<\/p>\n\n<h2 id=\"feature-flags-to-the-rescue\">Feature flags to the rescue<\/h2>\n\n<p>As this commit was part of a larger change, it couldn't be merged, so we added a feature flag around it.<\/p>\n\n<p>The values were set to null and hidden by default, and populated by the new changes and displayed if the flag was enabled.<\/p>\n\n<h2 id=\"here%27s-the-thing\">Here's the thing<\/h2>\n\n<p>This meant we could safely push the commit, make the changes available to everyone and enable the feature on the environments we wanted - preventing it from showing on production.<\/p>\n\n<p>This allowed us to get back to our usual working practices, and I didn't need to worry about accidentally pushing the commit and prematurely showing our changes in production.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>I was recently working on a feature over a few mob programming sessions.<\/p>\n\n<p>After the session, we implemented part of the feature but couldn't merge it as it wasn't complete.<\/p>\n\n<p>After working on other things that day, I'd need to rebase my local commits and push the last-but-one commit to the remote repository to keep the incomplete feature only in my local repository (I forgot a few times and almost pushed it accidentally).<\/p>\n\n<p>The commit prevented me from following continuous integration - where everyone commits and pushes their code a minimum of once daily.<\/p>\n\n<p>What if someone else wanted to look at that code between mob sessions? They couldn't, as it was only on my laptop.<\/p>\n\n<p>If I'd made a temporary branch, it would be outdated and behind other changes to our mainline branch.<\/p>\n\n<h2 id=\"feature-flags-to-the-rescue\">Feature flags to the rescue<\/h2>\n\n<p>As this commit was part of a larger change, it couldn't be merged, so we added a feature flag around it.<\/p>\n\n<p>The values were set to null and hidden by default, and populated by the new changes and displayed if the flag was enabled.<\/p>\n\n<h2 id=\"here%27s-the-thing\">Here's the thing<\/h2>\n\n<p>This meant we could safely push the commit, make the changes available to everyone and enable the feature on the environments we wanted - preventing it from showing on production.<\/p>\n\n<p>This allowed us to get back to our usual working practices, and I didn't need to worry about accidentally pushing the commit and prematurely showing our changes in production.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "1970-01-01T00:32:50+00:00",
"guid": null,
"hash": "9014cd6aad9e046cc2bea06ae3204989",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}