Skip to content

rehearse,registry: make explicit maps for type in NodeByName #818

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

Merged

Conversation

AlexNPavel
Copy link
Contributor

This changes the NodeByName type in pkg/registry to have explicit References, Chains, and Workflows fields as well as fixes a bug in the graphs handling of nested chains.

When the registry graph was first designed, it was assumed that nobody would make a chain and reference that have identical names (the as fields). This was not enforced in the release repo, however, and it has now become convention to have both a reference and a chain called {i|u}pi-conf-cluster_type for every cluster_type we support. This meant that the graph would overwrite references with the same names as chains. This could potentially cause a rehearsal to not occur for jobs that use just the reference with said name instead of the chain for whatever reason. It is also simply not ideal to overwrite data unintentionally anyway.

This also fixes a bug where the graph would only be able to nest one child chain per parent chain, even if there were multiple child chains. A new unit test has been added for this case.

/cc @stevekuznetsov

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2020
@AlexNPavel
Copy link
Contributor Author

/hold

This might be causing problems in the web UI

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2020
@AlexNPavel
Copy link
Contributor Author

/hold cancel

That's actually an issue with go 1.14 vs go 1.13 now that I have go 1.14 on my dev laptop. Not an issue with this PR, will work on fixing that issue in a different PR

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2020
Copy link
Contributor

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

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

Can we get an explicit set of test cases that would have failed before this change but now pass?

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlexNPavel, stevekuznetsov

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:
  • OWNERS [AlexNPavel,stevekuznetsov]

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

@openshift-merge-robot openshift-merge-robot merged commit 3319929 into openshift:master May 20, 2020
@AlexNPavel AlexNPavel deleted the split-reg-type-graph branch May 20, 2020 20:17
wking added a commit to wking/openshift-release that referenced this pull request Jun 24, 2020
The directory was from 23ca2ce (Bootstrap step registry with IPI
steps, 2019-11-17, openshift#5962).  But chains and refs are distinct types; we
don't need to use separate subdirectories to further distinguish their
names, especially since openshift/ci-tools@dd11c766ed
(rehearse,registry: make explicit maps for type in NodeByName,
2020-05-19, openshift/ci-tools#818).
wking added a commit to wking/ci-tools that referenced this pull request Aug 6, 2021
Catching up with dd11c76 (rehearse,registry: make explicit maps for
type in NodeByName, 2020-05-19, openshift#818).
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants