-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add 'deprecated' field for depreacted section generation in image docs #203
base: main
Are you sure you want to change the base?
Conversation
e1cc71f
to
d74e760
Compare
@@ -269,6 +271,11 @@ def build_releases_data( | |||
"until": eol.strftime("%m/%Y") | |||
} | |||
|
|||
if eol > datetime.now(timezone.utc): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't use datetime.UTC? https://docs.python.org/3/library/datetime.html#datetime.UTC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-triggered the tests
v["end-of-life"] for v in builds[img_number]["release"].values() | ||
), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc) | ||
if min_eol < datetime.now(timezone.utc): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI these dates are ISO formatted, so you should be able to compare them as strings
v["end-of-life"] for v in builds[img_number]["release"].values() | ||
), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc) | ||
if min_eol < datetime.now(timezone.utc): | ||
print("Track skipped because it reached its end of life") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this too late? I.e. the name
and path
are set before this, which means that even if there's no release, the image will still be built and tested right? But do we want that?
One or more files in this PR are not valid! 😬 See logs. |
589eb2e
to
22b17eb
Compare
Ping the @canonical/rocks team.
Description
The documentation generator for rocks is missing some parts necessary to generate the
Deprecated channels & tags
section.This PR provides the necessary values so that the generator can identify the deperacted tags and list them accordingly, using the expired end-of-life value of each track to determine whether it is depreacted or not.
Related issues
OCI-Factory builds won't work if one image's track has an expired EOL value. Another PR to fix that issue will be out soon.