Skip to content

Update build documentation with quick build optimization flags #13829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: 3.0
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented May 19, 2025

This PR updates the build documentation (toolkit/docs/building/building.md) to include the latest optimization flags and best practices for building Azure Linux more efficiently.

Changes

  • Added documentation for QUICK_REBUILD=y flag which optimizes builds across all stages
  • Added documentation for QUICK_REBUILD_TOOLCHAIN=y flag for optimizing toolchain builds
  • Added documentation for QUICK_REBUILD_PACKAGES=y flag for optimizing package builds
  • Updated all command examples to use these optimization flags
  • Added clear explanations of what each flag does
  • Added a note about quick build flags in the overview section for visibility
  • Fixed typos and minor grammatical issues

These changes bring the documentation up to date with the current build tools and optimization capabilities, providing developers with best practices for faster builds.

Benefits

These optimization flags significantly improve build performance by:

  • Using existing published components where possible
  • Enabling delta builds to avoid unnecessary rebuilds
  • Pre-fetching and caching dependencies
  • Limiting cascading rebuilds when a dependency changes

Fixes #13828.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the documentation Improvements or additions to documentation label May 19, 2025
Copilot AI and others added 2 commits May 19, 2025 18:35
Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Update build documentation with latest best-practices Update build documentation with quick build optimization flags May 19, 2025
@Copilot Copilot AI requested a review from dmcilvaney May 19, 2025 18:40
Copilot finished work on behalf of dmcilvaney May 19, 2025 18:40
@dmcilvaney
Copy link
Contributor

Can you use a similar setup as the linked PR?? I'd like to have a more guided flow for users, but also have in-depth guides that explain some of the WHY. Refer to the PR for some of those details (they should be mostly accurate still).

Copilot AI and others added 2 commits May 19, 2025 18:51
Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Copy link
Author

Copilot AI commented May 19, 2025

Can you use a similar setup as the linked PR?? I'd like to have a more guided flow for users, but also have in-depth guides that explain some of th...

I've updated the documentation structure following the pattern from PR #5218. The documentation now includes a main overview document with an "Is this document for you?" section at the top and dedicated guides for specific tasks including:

  1. Quick Build Optimization Guide for the optimization flags
  2. Package Building Guide for package-specific workflows
  3. Image Building Guide for image-specific workflows

All command examples now consistently use the optimization flags where appropriate. The commit 35bb54e contains these changes.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.fwupd.org
    • Triggering command: /usr/bin/fwupdmgr refresh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of dmcilvaney May 19, 2025 18:59
@dmcilvaney
Copy link
Contributor

I've had a detailed review made. Please read the provided review incorporate the suggestions.

# Critique of PR #13829: Update build documentation with quick build optimization flags

## Introduction & Diátaxis Context

This review uses the Diátaxis documentation framework (Tutorials, How-To Guides, Reference, Explanation) to analyze PR #13829. All section/file references are to the final version of PR #5218, unless otherwise specified.

---

## 1. Tutorials

**Expectation:** Step-by-step, learning-focused introductions for new users.

**Findings in PR #13829:**  
- The new PR introduces QUICK_REBUILD flags, but lacks a complete, guided build scenario for first-time contributors.
- In PR #5218, `toolkit/docs/building/building.md`, section “Quick Start” (lines 10–42), provides a clear walkthrough for new users, including environment setup, initial build, and verifying output. 
- Also in the same file, section “Building Your First Package” (lines 60–105) gives a practical example of building a package from scratch, illustrating the effect of build flags.

**Recommendation:**  
- Restore or adapt the “Quick Start” and “Building Your First Package” sections from PR #5218.
- Provide a boxed, narrative tutorial at the top of the build documentation, walking the user through a build with and without QUICK_REBUILD.

---

## 2. How-To Guides

**Expectation:** Task-oriented recipes for real-world scenarios.

**Findings in PR #13829:**  
- The documentation lists the new flags, but omits practical, scenario-based guidance.
- In PR #5218, see `toolkit/docs/building/building.md`, section “How to Avoid Unnecessary Toolchain Rebuilds” (lines 340–375), for actionable steps to prevent accidental full toolchain rebuilds, including an explanation of stable tags.
- Section “Troubleshooting Delta Builds” (lines 380–400) covers recovery when quick build flags misfire.

**Recommendation:**  
- Reintroduce these “How-To” sections, with explicit command-line examples and step-by-step solutions.
- Add a scenario: “If you set QUICK_REBUILD_TOOLCHAIN=y and experience slow builds, check your use of stable tags as described in the ‘How to Avoid Unnecessary Toolchain Rebuilds’ section.”

---

## 3. Reference

**Expectation:** Exhaustive, precise documentation of all build flags and variables.

**Findings in PR #13829:**  
- The list and matrix of flags is less complete than in PR #5218.
- In PR #5218, see `toolkit/docs/building/building.md`, section “Toolkit Build Flags Reference” (table on lines 220–260), for a matrix of all relevant build flags, possible values, defaults, and effects.
- The older PR also includes notes on flag interactions and edge cases (lines 270–295).

**Recommendation:**  
- Restore and update the detailed reference table.
- For each QUICK_REBUILD flag, ensure all possible values, defaults, and interactions are described.
- Add “See also” references to related troubleshooting and how-to sections.

---

## 4. Explanation

**Expectation:** Concepts, rationale, and consequences.

**Findings in PR #13829:**  
- There is little conceptual explanation of why quick rebuild flags exist, their architectural impact, or the risks of misusing QUICK_REBUILD_TOOLCHAIN.
- In PR #5218, see `toolkit/docs/building/building.md`, section “Background: Why Use Stable Tags?” (lines 310–325), for rationale and best practices.
- Section “What Happens During a Toolchain Rebuild?” (lines 330–339) explains the risks and consequences of full toolchain rebuilds.

**Recommendation:**  
- Reintroduce or adapt these “Explanation” sections, making clear the risks and best practices around toolchain and package rebuilds.
- Explicitly discuss why stable tags matter and how they interact with QUICK_REBUILD flags.

---

## Concrete References from PR #5218

- **Tutorials:**  
  - `toolkit/docs/building/building.md`, “Quick Start” (lines 10–42)
  - `toolkit/docs/building/building.md`, “Building Your First Package” (lines 60–105)

- **How-To Guides:**  
  - `toolkit/docs/building/building.md`, “How to Avoid Unnecessary Toolchain Rebuilds” (lines 340–375)
  - `toolkit/docs/building/building.md`, “Troubleshooting Delta Builds” (lines 380–400)

- **Reference:**  
  - `toolkit/docs/building/building.md`, “Toolkit Build Flags Reference” (lines 220–260)
  - `toolkit/docs/building/building.md`, flag interactions and notes (lines 270–295)

- **Explanation:**  
  - `toolkit/docs/building/building.md`, “Background: Why Use Stable Tags?” (lines 310–325)
  - `toolkit/docs/building/building.md`, “What Happens During a Toolchain Rebuild?” (lines 330–339)

---

## Summary & Next Steps

PR #13829 makes valuable updates, but omits much of the instructional, practical, and conceptual depth from PR #5218. To align with the Diátaxis model and maintain documentation quality:
- Expand Tutorials with step-by-step, beginner guides.
- Add practical How-To Guides, especially for avoiding toolchain rebuilds.
- Restore exhaustive Reference tables and notes.
- Reintroduce Explanation sections on rationale and consequences.

Addressing these points will ensure the documentation is both complete and genuinely useful for all users.

---

Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Copy link
Author

Copilot AI commented May 20, 2025

I've had a detailed review made. Please read the provided review incorporate the suggestions.

# Critique of PR #13829: Update build documentation with quick build optimization flags

...

I've updated the quick build optimization guide following the Diátaxis documentation framework. The updated document now includes:

  1. A clear "Is this guide for you?" section at the top
  2. Quick Start Tutorial section with step-by-step examples
  3. How-To sections for common optimization tasks
  4. Enhanced Reference section with a comprehensive flag table
  5. Background/Explanation sections on why optimizations matter
  6. Troubleshooting section for delta builds

The changes in commit dba714a structure the document to better match the guidance from PR #5218 while maintaining all the original optimization flag information.

Copilot finished work on behalf of dmcilvaney May 20, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 PRs Destined for 3.0 documentation Improvements or additions to documentation security
Projects
None yet
Development

Error loading sessions

Retrying...

Successfully merging this pull request may close these issues.

Update build documentation with latest best-practices
2 participants