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

fix syntax error with tekton results data model diagram #708

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

cmorinupgrade
Copy link
Contributor

@cmorinupgrade cmorinupgrade commented Feb 8, 2024

Changes

Mermaid does not support titles for graph. If we want to have a title we would need to proceed with:

graph BT
  title[Tekton Results Data Model]
  B(TaskRun) --> |Record| A[Result]
  C(Log) --> |Record| A
  D(PipelineRun) --> |Record| A

which would produce:
image

However, there is a header just above the diagram so the title is redundant.

I propose that we remove the title completely.

/kind docs

Release Notes

docs: Fix mermaid.js diagram for the Results data model

@tekton-robot tekton-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Feb 8, 2024
@tekton-robot
Copy link

@cmorinupgrade: The label(s) kind/docs cannot be applied, because the repository doesn't have them.

In response to this:

/kind docs

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot
Copy link

Hi @cmorinupgrade. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 8, 2024
@AlanGreene
Copy link
Member

Hey @cmorinupgrade, is this related to an issue on the docs site? If so it might just be a matter of updating the mermaid version used on the website as the current syntax is working on GitHub:
https://github.com/tektoncd/results?tab=readme-ov-file#data-model
image

@AlanGreene
Copy link
Member

Title support was added in mermaid 9.3.0

feat: Title support via front matter for ER, state, class, git, and graph diagrams (mermaid-js/mermaid#3706) @MasonM

@cmorinupgrade
Copy link
Contributor Author

Title support was added in mermaid 9.3.0

feat: Title support via front matter for ER, state, class, git, and graph diagrams (mermaid-js/mermaid#3706) @MasonM

Good catch. Granted we could update the version! Repeating the title would still be duplication though. I would personally do both update the version and remove the repeated title. I removed it to match the same pattern we can see under Life of a Result section (we do not add the title again in the diagram).

I will leave it up to the reviewers to decide.

Thanks Alan

@AlanGreene
Copy link
Member

AlanGreene commented Feb 8, 2024

Sounds good. I've also opened a PR to see if the updated version works on the website 🤞 tektoncd/website#588

Edit: that seems to have done the trick
image

@AlanGreene
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 8, 2024
@adambkaplan adambkaplan added the kind/documentation Categorizes issue or PR as related to documentation. label Feb 9, 2024
Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

/approve

Per @AlanGreene - this will work with the docs site as well.

I've added a release note, 🤞 the bot is happy, in which case I'll add lgtm too.

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan

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

The pull request process is described 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

@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 9, 2024
@adambkaplan
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 9, 2024
@tekton-robot tekton-robot merged commit 2592566 into tektoncd:main Feb 9, 2024
6 checks passed
@avinal
Copy link
Member

avinal commented Feb 12, 2024

Ah I was unable to respond in time: This issue is known and I had opened issue about it, closed due to inactivity: tektoncd/website#544. As per last discussion, we are using a certain hugo theme in our tektoncd website. Last time I checked the theme hasn't updated the mermaid version. It seems to be updated now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants