regex warnings in MsftLinuxPatchCore.py?
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- cloud, operating-systems
Research direction
Start in MsftLinuxPatchCore.py at lines 7451, 7468, and 7476, then reproduce the issue on an Ubuntu 24.04 Azure VM while watching the extension logs. Verify that the affected regex handling no longer emits invalid escape sequence warnings during LinuxPatchExtension startup.
Written by the indexing model from the issue text.
Description
Describe the bug
I see the following in my journalctl logs:
Aug 22 00:36:41 sr-monitor systemd[1]: Starting MsftLinuxPatchAutoAssess.service - Microsoft Azure Linux Patch Extension - Auto Assessment...
Aug 22 00:36:41 sr-monitor bash[143561]: /var/lib/waagent/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.62/MsftLinuxPatchCore.py:7451: SyntaxWarning: invalid escape sequence '\_'
Aug 22 00:36:41 sr-monitor bash[143561]: """ Fetches pid from the error message by searching for the text 'pid' and returns the process tree with all details.
Aug 22 00:36:41 sr-monitor bash[143561]: /var/lib/waagent/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.62/MsftLinuxPatchCore.py:7468: SyntaxWarning: invalid escape sequence '\d'
Aug 22 00:36:41 sr-monitor bash[143561]: regex = re.compile(' pid \d+')
Aug 22 00:36:41 sr-monitor bash[143561]: /var/lib/waagent/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.62/MsftLinuxPatchCore.py:7476: SyntaxWarning: invalid escape sequence '\d'
Aug 22 00:36:41 sr-monitor bash[143561]: regex = re.compile('\d+')
Is this a bug?
To Reproduce
Steps to reproduce the behavior:
- Create Azure Ubuntu VM
- Enable LinuxPatchExtension
- Watch the logs
Expected behavior
No regex warnings
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: ubuntu
- Browser N/A
- Version 24_04-lts
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
- Dominant language
- Python
- Stars
- 12
- Forks
- 20
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/LinuxPatchExtension
-
Difficulty 2/5 Half a day Newbie friendliness 68/100
Azure/LinuxPatchExtension#350 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Azure/LinuxPatchExtension#381 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Azure/LinuxPatchExtension#369 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Azure/LinuxPatchExtension#339 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Azure/LinuxPatchExtension#337 · 1 comment ·
All issues in Azure/LinuxPatchExtension
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100