Skip to content

[OCPERT-108] Make advisory urls clickable in the test-report #525

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

Draft
wants to merge 2 commits into
base: oar-errata-release-flow
Choose a base branch
from

Conversation

jhuttana
Copy link
Contributor

JIRA: https://issues.redhat.com/browse/OCPERT-108
Could you please take a look?

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 22, 2025
Copy link

openshift-ci bot commented May 22, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented May 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ming1013 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jhuttana jhuttana requested review from LuboTerifaj and rioliu-rh May 22, 2025 10:23
@jhuttana jhuttana changed the title Make advisory urls clickable in the test-report [OCPERT-108] Make advisory urls clickable in the test-report May 22, 2025
@jhuttana jhuttana marked this pull request as ready for review May 26, 2025 10:48
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 26, 2025
@openshift-ci openshift-ci bot requested review from barboras7 and tomasdavidorg May 26, 2025 10:49
@@ -160,7 +160,7 @@ def update_advisory_info(self, ad):
Args:
ad (str): advisories of current release
"""
self._ws.update_acell(LABEL_ADVISORY, ad)
self._to_hyperlink(self._ws.update_acell(LABEL_ADVISORY, ad))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it create hyperlink to all advisories or just one hyperlink?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want to add links for all the advisories in this cell, this method does not work. =HYPERLINK does not support multiple links in one cell. we need to use userEnteredValue in batch update request.
xref: https://stackoverflow.com/questions/77310503/how-to-add-multiple-hyperlinks-in-a-single-cell-in-google-sheets-using-python

Copy link
Contributor

@tomasdavidorg tomasdavidorg May 27, 2025

Choose a reason for hiding this comment

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

+1
I found the same:

  • Adding hyperlinks by formula is limited to only one.
  • Multiple links can be added manually by Ctrl/Cmd + K or by the api script.

@jhuttana jhuttana force-pushed the OCPERT-108-errata-based branch from fb5482f to 5057c95 Compare May 29, 2025 14:03
@jhuttana jhuttana force-pushed the OCPERT-108-errata-based branch from 5057c95 to 79d5b5b Compare May 29, 2025 14:08
@@ -94,7 +94,8 @@ def create_test_report(self):
# update advisory info
ad_cell_value = ""
for k, v in self._cs.get_advisories().items():
ad_cell_value += f"{k}: {util.get_advisory_link(v)}\n"
ad_link = {util.get_advisory_link(v)}
ad_cell_value += f"{k}: {self._report._to_hyperlink(ad_link, ad_link)}\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple =HYPERLINK in the same cell does not work as expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

You will need to use a different solution. See suggestions in #525 (comment).
The same applies also to master branch. See #524 (comment)

@LuboTerifaj
Copy link
Contributor

The changes were already merged to master with #524 and need to be fixed.

@rioliu-rh
Copy link
Contributor

The changes were already merged to master with #524 and need to be fixed.

it's not an issue on master, only one MR will be updated to the cell

@jhuttana jhuttana marked this pull request as draft May 30, 2025 02:45
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 30, 2025
@LuboTerifaj
Copy link
Contributor

Hello @rioliu-rh , the values are possible. If the amount of merge-requests changes, there will be a problem. The code worksheet.py#L95 suggest that more merge-requests are expected. We should cover the scenario to avoid potential bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants