Skip to content

Commit 699463b

Browse files
authored
feature: cleanup UpdateWiki workflow and add links to the OCI artifacts (#1814)
* Optimize wiki update workflow to reduce GitHub API calls - Remove expensive GitHub API calls for commit details and PR checking - Replace API-based plugin details fetching with local git shallow clones - Add OCI image links for plugins available on ghcr.io - Use repo-backstage-version field directly from source.json - Add path filter to only trigger on workspace changes - Remove unused pull-requests permission This significantly reduces API usage while maintaining functionality and adding OCI image discovery for better user experience. * Temporarily disable path filter for testing wiki workflow Comment out the 'workspaces/**' path filter to allow the workflow to run on all pushes to the feature branch for testing purposes. * Fix branch name in workflow trigger: RHDH -> RHIDP * Add debug counters to track API usage in wiki workflow - Add counters for GitHub API calls (should be 0) - Track HTTP calls for OCI image checks - Count git operations and cache hits - Log final usage report at end of workflow This will help verify the optimization effectiveness. * Add fallback OCI image search links for Supported/TechPreview plugins - If specific OCI image is not found, link to GitHub Packages search - Uses container name derived from package name for better search results - Only applies to Supported and TechPreview plugins - Optimized http calls to only check for Supported/TechPreview plugins * Enhance OCI package links with better search and fallback - Use organization-level package search (github.com/orgs/redhat-developer/packages) for broader discovery - Provide package-specific search links for all plugins with a package name - Add fallback link to general repository packages for plugins without a package name - Removes restriction to only Supported/TechPreview, allowing search for all plugins - Maintains optimized performance (no extra HTTP calls) * Re-enable path filter for production workflow Restore the 'workspaces/**' path filter to ensure the wiki update workflow only runs when workspace files are modified, reducing unnecessary executions while maintaining optimized performance. * Test workflow trigger: add harmless test field to quickstart source.json This change should trigger the wiki update workflow due to the 'workspaces/**' path filter, allowing us to test the optimized workflow functionality. * Remove debug counters and test workflow with quickstart description - Remove all debug counter code from wiki generator (no longer needed) - Add description field to quickstart workspace source.json - This change should trigger the optimized wiki workflow * Fix YAML boolean type for workflow dispatch input Remove quotes from boolean default value to fix GitHub Actions type error. * Add controlled OCI image checking to reduce HTTP calls - Add workflow_dispatch parameter 'skip_oci_images' to optionally disable OCI checks - Automatic push events still include OCI checks for updated wiki content - Manual runs can skip OCI checks to reduce HTTP calls from ~55 to 0 - Maintains OCI image links in automatic wiki updates while allowing faster manual runs * Re-add debug counters to monitor OCI image control effectiveness - Add back debug counters to track API usage and OCI image checks - Verify that skip_oci_images parameter reduces HTTP calls from ~55 to 0 - Monitor cache effectiveness and git operations * Test OCI image control with debug counters Add test field to trigger workflow and verify OCI image control works: - Automatic push: should include OCI checks (~55 HTTP calls) - Manual dispatch with skip_oci_images=true: should have 0 HTTP calls * Add feature/RHIDP-11416 branch to workflow triggers Enable workflow to run on feature branch for testing OCI image control and debug counter verification. * Fix default value for checkOciImages in wiki generator script Set checkOciImages default to true to ensure OCI image checking and link generation happens by default (e.g. for automatic triggers where the parameter might not be explicitly passed). * Clean up debug counters and related code Remove all debug counter code, increments, and logging from the wiki generator: - Removed debugCounters object definition - Removed all counter increment calls throughout the code - Removed logDebugCounters function and its call - Code is now clean and ready for production use * Add smart OCI image checking with scheduled weekly refresh Implement intelligent OCI image checking logic: - Scheduled runs (Monday 9 AM UTC): Always check OCI images for weekly refresh - Main/release branches: Always check OCI images for important docs - Feature branches: Skip OCI checks to reduce HTTP calls - Manual runs: User can choose to skip or include OCI checks - This minimizes HTTP calls while ensuring links stay current * Fix skip_oci_images flag usage in workflow logic The flag was defined but not being used in the logic. Now: - Main/release branches: Check OCI images by default (55 HTTP calls) - Manual runs: Can skip OCI checks by checking the flag (0 HTTP calls) - Feature branches: Never check OCI images (0 HTTP calls) This gives users control while maintaining automatic functionality. * Clean up workflow logic - remove debug complexity Simplify OCI image checking logic: - Check OCI images only on main/release branches - Remove complex skip flag logic for cleaner production code - Keep workflow simple and maintainable * Revert test changes to workspaces/quickstart/source.json Remove test field and revert commit hash to match main branch. This cleans up the test modifications made during workflow testing. * Update repo reference in source.json * Fix JSON formatting in source.json * Final PR cleanup * Update push triggers in update-wiki.yml Removed feature branch from push triggers in workflow. * Add versions.json to workflow trigger paths
1 parent a5da3d9 commit 699463b

File tree

2 files changed

+186
-176
lines changed

2 files changed

+186
-176
lines changed

0 commit comments

Comments
 (0)