Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 13.1 missing #47

Closed
llauren opened this issue Dec 19, 2022 · 12 comments
Closed

macOS 13.1 missing #47

llauren opened this issue Dec 19, 2022 · 12 comments

Comments

@llauren
Copy link
Contributor

llauren commented Dec 19, 2022

Hi!

I'm using the macos.json as input for one of my automations and i notice that macOS 13.1 (22C65), released 2022-12-13, is missing from the release data. How can i help? Can i? Should i? Is the data file automatically updated (and is now stuck) or manually curated?

~rL

@llauren
Copy link
Contributor Author

llauren commented Dec 19, 2022

I'm getting closer.

Yes, the json release data is automatically populated for macOS. I've now given it a read.

And: There is a bug on Apple's web page: Line 485 says

</tr><tr><td><a href="https://support.apple.com/kb/HT213532">macOS Ventura&nbsp;13.1</a></td>

Note the &nbsp; between Ventura and 13.1.

Solution 1: Get Apple to fix their bug. Hard but correct.

Solution 2: Edit the Regexp in src/apple.py to allow for &nbsp; in addition to a space character. Stupid but stupid.

What do you think?

@marcwrobel
Copy link
Member

marcwrobel commented Dec 19, 2022

Hi @llauren,

Nice catch!

The nbsp; is not a bug IMHO, because visually it is still as space. And I doubt we will find a way to get Apple to change it ;). So solution 2 may be our only solution.

Are you using the macos.json in this repository (https://github.com/endoflife-date/release-data/blob/main/releases/macos.json) or the one on https://endoflife.date (https://endoflife.date/api/macos.json) ? If it is the one in this repository, I suggest you use endoflife.date API instead because it is potentially more up-to-date (it will have both https://github.com/endoflife-date/release-data/blob/main/releases/macos.json and versions added manually in https://github.com/endoflife-date/endoflife.date/blob/master/products/macos.md).

@llauren
Copy link
Contributor Author

llauren commented Dec 19, 2022

I actually submitted a bug report through AppleCare Enterprise 😁 . I'm not sure if Apple will fix the problem, but as for now, it is reported and we're going through route 1.

I have a Python automation which uses the API at https://endoflife.date/api/macos.json and parses it for the versions we want to support ("N" and "N-1", so 13 and 12), then slacks the users with out of date systems. Now the problem of course is that because the data believes macOS 13.0.1 is the latest and greatest, those with this actually out-of-date version won't get a notification.

With the help of pythex.org, i propose the following addition to the file https://github.com/endoflife-date/release-data/blob/main/src/apple.py#L33 :

        # Bug compatibility with Apple Support document HT201222 for Ventura 13.1
        r"macOS [\w\s]+(?P<version>\d{2}(?:\.\d+)+)",

Explanation: The   is converted in to a UNICODE non-converting space. The regexp will search for and then words or spaces, including non-breaking space. Tested on Python 3.10.4.

Addendum: I got to support the bug to the Apple developer team. I'm still not convinced that they will lift the required finger, but at least it's an interesting journey.

marcwrobel added a commit that referenced this issue Dec 19, 2022
There were two issues with the macOS regexes:

- The regexex accepted only spaces separator. But non-breakable spaces are also used from time to time. Replacing spaces by \s fixed the issue (other product regexes were also updated - never know).
- The first regex, the one that accepted major releases with no minor version, were not useful (covered by the second regex) and partly catched valid versions (such as 13.1), who was then ignored. I removed it.
@marcwrobel
Copy link
Member

marcwrobel commented Dec 19, 2022

Let me help you on the regex : #48.

I think you were confused by the fact that the nbsp; is transformed to a non-breakable space by BeautifulSoup before the regex is applied.

@llauren
Copy link
Contributor Author

llauren commented Dec 19, 2022

You are absolutely correct, and i edited my comment above to reflect that. Now, how can a silly little non-coder submit a fix?

@marcwrobel
Copy link
Member

marcwrobel commented Dec 19, 2022

I already did in #48 (it fixes two issue with the script). Other macOS versions will also be updated thanks to that. Thank you for your issue !

@llauren
Copy link
Contributor Author

llauren commented Dec 19, 2022

Oh, OK. There went my claim to eternal fame 😁

When will the update be live on the API?

@marcwrobel
Copy link
Member

The PR must be reviewed by @captn3m0 and after that https://github.com/endoflife-date/endoflife.date must be updated (by some GitHub workflow).

So I would say tomorrow at best.

@llauren
Copy link
Contributor Author

llauren commented Dec 19, 2022

OK, thanks for the cooperation! It's been fun and even a tad enlightening!

@llauren llauren closed this as completed Dec 19, 2022
@captn3m0
Copy link
Member

captn3m0 commented Dec 19, 2022 via email

@marcwrobel
Copy link
Member

No need to close the issue @llauren, it will be automatically close when the PR is merged.

@marcwrobel marcwrobel reopened this Dec 19, 2022
@marcwrobel
Copy link
Member

@llauren, macOS 13.1 is now on https://endoflife.date/macos. Thanks again for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants