<#341 Link schema tables to their spec at the rele...
# website
g
#341 Link schema tables to their spec at the release tag Pull request opened by mike-myers-aapl Each schema version on the site links its tables to their spec files on osquery's
master
branch, using the path each spec had when that version was released. When a spec is later moved or removed, the link breaks for every older version. For example,
homebrew_packages
moved from
specs/darwin/
to
specs/posix/
in osquery 5.24.0 (osquery/osquery#9106), so its link is broken in 5.23.1 and every earlier version. Across all 51 schema versions, 937 links to 53 tables were broken. This included: • Moved specs: for example the
lxd_*
tables (
posix
to
linux
),
battery
(to
macwin
),
curl
and
groups
(to the top of
specs/
), and
socket_events
(
linux
to
posix
). • Removed or renamed specs: for example the
elf_*
tables,
alf_services
,
kernel_integrity
,
smart_drive_info
, and
yara
(split into
yara_file
and
yara_process
). The current version (5.24.0) had no broken links, but each of its links would break as soon as that spec moved. Changes in this PR • One-time fix to existing schema versions: every link in
src/data/osquery_schema_versions/*.json
now points to that version's release tag instead of master, e.g.
blob/5.23.1/specs/darwin/homebrew_packages.table
. This is a text replacement of the URL prefix only, so each file's formatting is unchanged: 13,043 lines changed, one per link. The 4.0.2
alf_services
link, generated without its
specs/darwin/
directory, is also corrected. • Fix for all future releases:
tools/new_release.rb
now rewrites the master links in `genwebsitejson.py`'s output to the release tag, so new versions get tag links without an osquery change. Pinning to the tag also means each version's page now shows the spec as it was in that release, not the current version of the file. Testing • Checked every link in all 51 files against the osquery repository's tags: all 13,043 point to a file that exists at their version's tag (previously 937 were broken). All files still parse as JSON. • Ran
generate_table_api_python
from
new_release.rb
against an osquery checkout: all 293 generated links point to
blob/5.24.0/specs/...
and none to master. osquery/osquery-site