Skip to content

End link files with a newline, tidy path handling#3348

Merged
chrisberkhout merged 4 commits intoelastic:mainfrom
chrisberkhout:fix-link
Mar 11, 2026
Merged

End link files with a newline, tidy path handling#3348
chrisberkhout merged 4 commits intoelastic:mainfrom
chrisberkhout:fix-link

Conversation

@chrisberkhout
Copy link
Copy Markdown
Contributor

Summary

  • Write a final newline when updating link files.
    This is particularly helpful when working with them in the terminal.
  • Clarify and enforce requirements on CreateLinksFSFromPath arguments.
    The previous godoc, which said "workDir must be a path to a directory, relative to the repository root" was incorrect or at least misleading. Usually the repository root has a name that is absolute, and in that case workDir must also be an absolute path for filepath.Rel to succeed. The change clarifies the requirements, enforcement and error messages.

Related issues

@chrisberkhout chrisberkhout self-assigned this Mar 6, 2026
@chrisberkhout chrisberkhout added Team:Security-Service Integrations Security Service Integrations Team bug Something isn't working labels Mar 6, 2026
@teresaromero
Copy link
Copy Markdown
Contributor

@chrisberkhout there is a side-effect for your changes, fields unit tests are failing because the path used for tests is relative.. could you review the change or update tests? also, when test pass we should trigger an integration job to check this does not break any package that might be using link files now. just write in a comment test integrations

@chrisberkhout
Copy link
Copy Markdown
Contributor Author

test integrations

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Created or updated PR in integrations repository to test this version. Check elastic/integrations#17731

@elasticmachine
Copy link
Copy Markdown
Collaborator

elasticmachine commented Mar 10, 2026

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @chrisberkhout

@chrisberkhout
Copy link
Copy Markdown
Contributor Author

The integrations tests fail for m365_defender, microsoft_defender_cloud and ti_abusech, but I'm not sure why and they pass for me locally. I suspect it's not this change. Everything else passes.

@jsoriano
Copy link
Copy Markdown
Member

The integrations tests fail for m365_defender, microsoft_defender_cloud and ti_abusech, but I'm not sure why and they pass for me locally. I suspect it's not this change. Everything else passes.

Issues with these packages are hopefully fixed with elastic/integrations#17695.

@chrisberkhout chrisberkhout merged commit 38f0db3 into elastic:main Mar 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Team:Security-Service Integrations Security Service Integrations Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix link inclusion during package build

4 participants