Skip to content
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

Rework build caching #843

Merged
merged 4 commits into from
Sep 3, 2023
Merged

Rework build caching #843

merged 4 commits into from
Sep 3, 2023

Conversation

jdknight
Copy link
Member

@jdknight jdknight commented Sep 3, 2023

The following provides a series of corrections and improvements towards this extension tracking outdated pages and managing/tracking publication information to help manage cleanup processes when only subset of pages are updated.

Part of the problem with this extension's original implementation is that lack of consideration for Sphinx's documentation cache. In most use cases, the -E argument was used/promoted to start with a clean environment to ensure all documents are processed and published. For uses who did not force a clean environment would see unexpected results, mainly when cleanup options were enabled. Specifically, after publishing documentation, a re-publish of new documentation with a subset of changes could make some valid-but-not-updated pages be removed.

This commit should bring proper cache management to handle rebuilds and republish events. We now track a hash of the Confluence-specific configuration hash to help immediately flag pages as outdated when these entries are updated. We also now keep track of last page publish identifiers from a previous publication event. This information can be used to unflag pages that are believed to be legacy pages, ensuring up-to-date pages remain on the target Confluence instance.

The following provides a series of corrections and improvements towards
this extension tracking outdated pages and managing/tracking publication
information to help manage cleanup processes when only subset of pages
are updated.

Part of the problem with this extension's original implementation is
that lack of consideration for Sphinx's documentation cache. In most use
cases, the `-E` argument was used/promoted to start with a clean
environment to ensure all documents are processed and published. For
uses who did not force a clean environment would see unexpected results,
mainly when cleanup options were enabled. Specifically, after publishing
documentation, a re-publish of new documentation with a subset of
changes could make some valid-but-not-updated pages be removed.

This commit should bring proper cache management to handle rebuilds and
republish events. We now track a hash of the Confluence-specific
configuration hash to help immediately flag pages as outdated when these
entries are updated. We also now keep track of last page publish
identifiers from a previous publication event. This information can be
used to unflag pages that are believed to be legacy pages, ensuring
up-to-date pages remain on the target Confluence instance.

Signed-off-by: James Knight <[email protected]>
With the re-work in managing build cache and managing legacy pages,
adding a series of unit tests to verify these capabilities.

Signed-off-by: James Knight <[email protected]>
Adding a series of configuration entries to flag an outdated
documentation set if these options are changed. These options were not
set before, however, navigation changes can require a full republish,
especially if other navigation options (e.g. next-prev pages) are
enabled.

Signed-off-by: James Knight <[email protected]>
Signed-off-by: James Knight <[email protected]>
@jdknight jdknight merged commit b8fda7a into main Sep 3, 2023
26 checks passed
@jdknight jdknight deleted the rework-build-caching branch September 3, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant