Skip to content

[docs] Add applies_to to more situations in exported fields#45654

Closed
colleenmcginnis wants to merge 20 commits intoelastic:mainfrom
colleenmcginnis:applies_to-exported-fields
Closed

[docs] Add applies_to to more situations in exported fields#45654
colleenmcginnis wants to merge 20 commits intoelastic:mainfrom
colleenmcginnis:applies_to-exported-fields

Conversation

@colleenmcginnis
Copy link
Contributor

@colleenmcginnis colleenmcginnis commented Jul 30, 2025

Note

Starting with v9.0, there is no longer a new documentation set published with every minor release: the same page stays valid over time and shows version-related evolutions. Read more in Write cumulative documentation.

Related to #45436, https://github.com/elastic/docs-content-internal/issues/128

Updates generate_fields_docs.py to add more applies_to badges as needed. Currently we're only adding deprecated badges to fields when there's a deprecated property in fields.yml. In addition to those, we want to add an applies_to badge when:

To test out the new version property, I added a version to fields.yml files that contained new fields in 9.1.0 from these two PRs:

I also made some slight formatting changes to improve how definition lists are rendered (indenting all lines in a definition list item).

Some notes for the reviewers:

  • I don't have a lot of experience writing in Python so please let me know if anything can be improved.
  • I'm not sure if there are contributing guidelines that should be updated to reflect these changes.
@colleenmcginnis colleenmcginnis self-assigned this Jul 30, 2025
@colleenmcginnis colleenmcginnis added docs Team:Docs Label for the Observability docs team labels Jul 30, 2025
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 30, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 30, 2025

🔍 Preview links for changed docs

More links …

In total, 219 files changed.

@colleenmcginnis colleenmcginnis added backport-9.0 Automated backport to the 9.0 branch backport-9.1 Automated backport to the 9.1 branch labels Jul 30, 2025
@colleenmcginnis colleenmcginnis marked this pull request as ready for review July 31, 2025 00:05
@colleenmcginnis colleenmcginnis requested review from a team as code owners July 31, 2025 00:05
@colleenmcginnis
Copy link
Contributor Author

👋 @VihasMakwana I haven't been able to get the check-docs to pass. Any tips?

@VihasMakwana
Copy link
Contributor

VihasMakwana commented Aug 4, 2025

@colleenmcginnis Hi!
Sorry, I was on SDH rotation previous week and was busy with a couple of top priority SDHs. I'll take a look and get back to you.

@VihasMakwana
Copy link
Contributor

@colleenmcginnis Can you go to libbeat in your local machine and run make check && make update and commit any modified files.

@colleenmcginnis colleenmcginnis requested a review from a team as a code owner August 4, 2025 14:08
@colleenmcginnis colleenmcginnis requested a review from rdner August 4, 2025 14:08
@VihasMakwana
Copy link
Contributor

I think you have to same in filebeat and metricbeat folders.

@colleenmcginnis
Copy link
Contributor Author

I think you have to same in filebeat and metricbeat folders.

I went through and ran make check && make update in the directory for each individual beat. filebeat was the only one that resulted in files changed (8f409e3).

@colleenmcginnis
Copy link
Contributor Author

👋 @elastic/observablt-ci, @rdner, and @elastic/obs-infraobs-integrations (maybe @tommyers-elastic since this contains updates related to #44851) can you please take a look at this PR? 🙏

@rdner
Copy link
Member

rdner commented Aug 6, 2025

@colleenmcginnis there are 227 changed files in the diff. I went through ~10 first files and it's all indentation changes.

I think it's fair to say that the expectation that someone would review all of the 227 files is quite unrealistic. Could you point us to the files with important changes that need to be reviewed?

Ideally all the formatting changes should happen in a separate PR and should not be mixed with any code changes.

@VihasMakwana
Copy link
Contributor

Could you point us to the files with important changes that need to be reviewed

@rdner Hi!

I'd say, we should focus on libbeat/scripts/generate_fields_docs.py and the fields.yml files (there are 4 of them).
The documents under docs/reference are autogenerated by the python script. We can review a few of them and verify if they're rendered correctly. For eg. for winlogbeat's powershell module, you can go to https://docs-v3-preview.elastic.dev/elastic/beats/pull/45654/reference/winlogbeat/exported-fields-powershell to check for formatting errors.

Same applies for any other module.

@rdner
Copy link
Member

rdner commented Aug 6, 2025

@VihasMakwana I would still prefer to have code change and formatting changes in 2 separate PRs, it's a lot of noise.

@colleenmcginnis
Copy link
Contributor Author

colleenmcginnis commented Aug 6, 2025

I would still prefer to have code change and formatting changes in 2 separate PRs, it's a lot of noise.

Sure, I can copy the changes to the libbeat/scripts/generate_fields_docs.py file into a different PR, but will the checks still pass if I don't also commit the changes to the Markdown files?

there are 227 changed files in the diff. I went through ~10 first files and it's all indentation changes.

For what it's worth, if you hide whitespace changes in the diff there are 61 files changed (that's what I did to check all the resulting files before requesting a review from the larger group).

@colleenmcginnis
Copy link
Contributor Author

Blocked by #45772.

@rdner
Copy link
Member

rdner commented Aug 6, 2025

will the checks still pass if I don't also commit the changes to the Markdown files?

I'm not familiar with the check but we can still temporary disable the formatting check in #45772 (review) and re-enable it here.

@bmorelli25
Copy link
Member

I'm not familiar with the check but we can still temporary disable the formatting check in #45772 (review) and re-enable it here.

@rdner do you know who has the power to help with that once we get the final review from the ci team?

@colleenmcginnis colleenmcginnis removed request for a team August 6, 2025 18:27
faec and others added 2 commits August 7, 2025 10:34
Fixes a panic in the winlog input that happened because of a conflict in the internal id of its metrics registry elastic#45693.

When checking whether a registry input id already exists, the check didn't include the ids of input registries with "nested" type (which are unreported containers for cursor-based inputs that can have several sub-inputs inside).

This is usually not a problem because the default (and what most inputs use even when overriding their id, e.g. I think this is why it probably didn't hit the GCP input) is to use a scoped id like "input_id::source_id", so they don't conflict with the container which has bare id "input_id".
This hit winlog in particular because:
- winlog always uses a source id that is the same as its input id
- winlog still used the global input metrics helpers in the `inputmon` package instead of the metrics registry provided by the Filebeat inputs API
- winlog is the only input that did not add a scope prefix on the id provided to `inputmon.NewInputRegistry`, so the globally-created registry conflicted with the input manager's container (and this conflict was missed because of the missed "nested" type check above).

Fixing the missed "nested" collision check would prevent the input panic, but the collision itself would still exist and prevent winlog input metrics from being reported.

This PR both fixes the missed "nested" conflict check and removes the deprecated global metrics call from the winlog input, replacing it with the API-provided registry.
…lastic#45591)

* chore: Update snapshot.yml

Made with ❤️️ by updatecli

* chore: Update snapshot.yml

Made with ❤️️ by updatecli

* chore: Update snapshot.yml

Made with ❤️️ by updatecli

* chore: Update snapshot.yml

Made with ❤️️ by updatecli

* chore: Update snapshot.yml

Made with ❤️️ by updatecli

* chore: Update snapshot.yml

Made with ❤️️ by updatecli

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rdner rdner force-pushed the applies_to-exported-fields branch from 7832ca1 to d274ece Compare August 7, 2025 08:34
@mergify
Copy link
Contributor

mergify bot commented Aug 7, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b applies_to-exported-fields upstream/applies_to-exported-fields
git merge upstream/main
git push upstream applies_to-exported-fields
@rdner
Copy link
Member

rdner commented Aug 7, 2025

Sorry for the mess, I'm closing this in favor of #45772 where we will include the documentation changes as well for the sake of simplicity.

It's easier to backport this way.

@rdner rdner closed this Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-9.0 Automated backport to the 9.0 branch backport-9.1 Automated backport to the 9.1 branch docs Team:Docs Label for the Observability docs team

5 participants