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

Add 'deprecated' field for depreacted section generation in image docs #203

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

linostar
Copy link
Contributor

@linostar linostar commented Jun 21, 2024

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.

@linostar linostar force-pushed the ROCKS-1224/support-deprecated-channels-tags branch from e1cc71f to d74e760 Compare June 21, 2024 12:46
@linostar linostar marked this pull request as ready for review June 21, 2024 15:57
@@ -269,6 +271,11 @@ def build_releases_data(
"until": eol.strftime("%m/%Y")
}

if eol > datetime.now(timezone.utc):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@linostar linostar requested a review from a team as a code owner October 7, 2024 12:13
Copy link
Collaborator

@cjdcordeiro cjdcordeiro left a 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

Comment on lines +76 to +78
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):
Copy link
Collaborator

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")
Copy link
Collaborator

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?

Copy link

github-actions bot commented Nov 7, 2024

One or more files in this PR are not valid! 😬
Run ID: 11717870890 ; Attempt: 1

See logs.

@linostar linostar force-pushed the ROCKS-1224/support-deprecated-channels-tags branch from 589eb2e to 22b17eb Compare November 7, 2024 06:39
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

Successfully merging this pull request may close these issues.

3 participants