Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Conversation

@droslean
Copy link
Member

@droslean droslean commented Mar 25, 2019

When a template file will change, rehearse all cluster types by choosing a random job that uses the corresponding template and cluster type.
Ignores the cluster types of jobs from the changed presubmits that uses the template.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 25, 2019
@droslean
Copy link
Member Author

droslean commented Mar 25, 2019

/cc @openshift/developer-productivity-test-platform

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.

I'm still not super certain this is a good idea -- what information does this approach give us that running the job without changing it's command does not? We get a strict subset of information, right? Why not just run the job fully?

@droslean
Copy link
Member Author

I'm still not super certain this is a good idea -- what information does this approach give us that running the job without changing it's command does not? We get a strict subset of information, right? Why not just run the job fully?

@stevekuznetsov Double thinking that, you are right. I guess is not a big deal to run the whole job. I will address that.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 26, 2019
@droslean droslean changed the title [WIP] - On a template change, rehearse all cluster types. On a template change, rehearse all cluster types. Mar 26, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2019
@droslean droslean changed the title On a template change, rehearse all cluster types. WIP - On a template change, rehearse all cluster types. Mar 26, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2019
@droslean droslean changed the title WIP - On a template change, rehearse all cluster types. On a template change, rehearse all cluster types. Mar 26, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2019
@droslean droslean changed the title On a template change, rehearse all cluster types. WIP - On a template change, rehearse all cluster types. Mar 26, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2019
Copy link
Contributor

@bbguimaraes bbguimaraes left a comment

Choose a reason for hiding this comment

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

I think we can do better than random if we analyze the usage of templates, but this is OK as a first step. I left some comments on specific implementation details. Two suggestions about things that made the review more difficult than it could have been:

  • Don't mix refactoring/fixes with features, specially in the same commit. Put them in separate commits, ideally at the beginning of the history (or in a separate PR) if they don't depend on the new code.
  • Overall, we have been adding a lot of ad-hoc code that is very similar to existing code. We should try to consolidate new and existing code, refactoring as needed.

return nil, nil
}

templateData, err := config.GetTemplateData(templates[templateKey])
Copy link
Contributor

Choose a reason for hiding this comment

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

We decode the same templates (in config.GetTemplateData) countless times. We should store the value when they are first loaded. Many of the new "error handling" ifs we have are because of that function, even though it is guaranteed not to fail if it succeeded once.

Copy link
Member Author

Choose a reason for hiding this comment

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

that's sound like a good follow-up

@droslean
Copy link
Member Author

@openshift/developer-productivity-test-platform I would like to squash some commits before merging.

@bbguimaraes
Copy link
Contributor

Latest changes LGTM. I still think we are adding a lot more tech debt here than necessary, but am OK with addressing it in subsequent PRs.

@droslean droslean changed the title WIP - On a template change, rehearse all cluster types. On a template change, rehearse all cluster types. Mar 29, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 29, 2019
@droslean droslean changed the title On a template change, rehearse all cluster types. WIP On a template change, rehearse all cluster types. Mar 29, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 29, 2019
@droslean droslean changed the title WIP On a template change, rehearse all cluster types. On a template change, rehearse all cluster types. Apr 1, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2019
@bbguimaraes
Copy link
Contributor

@openshift/developer-productivity-test-platform: is there anything else that needs to be done here? This looks ready to me and I'd like to get the fixes to the integration tests merged ASAP.

@petr-muller
Copy link
Member

is there anything else that needs to be done here? This looks ready to me and I'd like to get the fixes to the integration tests merged ASAP.

@bbguimaraes I wanted to have a final look today afternoon, but if it blocks you feel free to merge it

Copy link
Member

@petr-muller petr-muller left a comment

Choose a reason for hiding this comment

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

/lgtm

I must admit I was a bit hesitant to return to this one because the previous versions were a bit harder to review, but I really like how this one unfolded, I like the current version very much!

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: droslean, petr-muller

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [droslean,petr-muller]

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants