Skip to content

Conversation

@petr-muller
Copy link
Member

@petr-muller petr-muller commented Nov 19, 2020

/hold
Builds on #1429

This is a thing of beauty! The tests needed to be completely rewritten (there were no real tests for the inlining functionality not working over the CM references -- removed in #1249 ), and the method was refactored - it is probably easier to review as new code than looking at the diff.

There is an annoying gotcha in that our code avoids resolving whole ci-op configs, but it resolves only the test relevant for the job, which is impossible to detect for handcrafted jobs in other way than looking at the --target=XXX parameter. Other option was to implement a "if no matching test was found, resolve all present, but that changes the behavior more significantly, and breaks multiple integration tests (which are a pinnacle of engineering themselves :trollface: ) so I decided to go for the more targeted approach of inspecting --target.

Fixes: DPTP-1685

@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 Nov 19, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 19, 2020
@petr-muller
Copy link
Member Author

/hold cancel

@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 Nov 19, 2020
@AlexNPavel
Copy link
Contributor

We have a lot of jobs that use environment variables in the target and/or the UNRESOLVED_CONFIG itself. Could we run a quick substitute over the target and config using the env vars set for the container? Here is an example of a job that does this: https://github.com/openshift/release/blob/master/ci-operator/jobs/openshift/release/openshift-release-release-4.7-periodics.yaml#L5640:L5687

Both the BRANCH and CLUSTER_TYPE are defined as env vars in the container spec, so it should be as simple as running a for loop over those env vars and substituting all $(var_name) with the corresponding value.

@petr-muller
Copy link
Member Author

petr-muller commented Nov 25, 2020

Both the BRANCH and CLUSTER_TYPE are defined as env vars in the container spec, so it should be as simple as running a for loop over those env vars and substituting all $(var_name) with the corresponding value.

@AlexNPavel I was thinking about how to handle this best and I'd like to avoid getting into some weird middle state where we would substitute variables "somewhat like kube but not quite". E.g. then we'd need to handle also cases where something is first e.g. substituted in $CLUSTER_TYPE and such resolved value is then subsituted in UNRESOLVED_CONFIG? Maybe there is code we could reuse that does this for pods in kube? Not sure. But I'd like to tackle this in a dedicated followup.

@petr-muller petr-muller force-pushed the unresolved-config branch 3 times, most recently from f7dced2 to c6a1d8c Compare November 30, 2020 14:05
@petr-muller
Copy link
Member Author

@stevekuznetsov addressed, PTAL

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 [petr-muller,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 2b18cae into openshift:master Dec 1, 2020
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.

5 participants