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

Get rid of versionInfo based templating. Get rid of versionInfo field from tasks and experiment.spec. #953

Closed
2 tasks
sriumcp opened this issue Aug 9, 2021 · 8 comments
Labels
area/analytics Metrics, statistical estimation, and bandit algorithms for traffic shifting area/tasks Iter8 tasks kind/enhancement New feature or request

Comments

@sriumcp
Copy link
Member

sriumcp commented Aug 9, 2021

Is your feature request related to a problem? Please describe the problem.
Templating in experiment is complicated. Templating based on version specific information takes this complication to a higher level and makes it really complicated.

Describe the feature/solution you'd like
Drop versionInfo based templating. Drop versionInfo field from all tasks and experiment spec. Version info is still required for metrics as described in #942; this is ok since we are not planning to use it for version specific templating within metrics.

Will this feature/solution bring new benefits for Iter8 users? What are they?
Makes experiments less voodoo and more easy to read/write.

Will this feature/solution bring new benefits for Iter8 developers? What are they?

  • Makes tutorials less voodoo and more easy to read/write.
  • Makes task development less complicated. Templates will not have version-specific variables. They can still interpolate based on experiment-level variables / functions.

Does this issue require a design doc/discussion? If there is a link to the design document/discussions, please provide it below.
Yes, see above. The main disadvantage of this approach is that it can make common/bash tasks and individual metrics longer and repetitive. For common/bash, this may not be such a big disadvantage if it is short to begin with. Enhancements like #954 should make things even more compact. For metrics, we are giving up brevity for the sake of explicitness / ease of understanding. Metrics is one of the harder things for users to get right to begin with; ease of understanding is more important to have here compared to brevity.

As discussed in #941, experiment.spec will now have a versionNames field which is simply a list of version names (strings).

How will this feature be tested?

  • Existing tests need to work (and may need to be restructured)

How will this feature be documented?

  • iter8.tools documentation to be updated.
@sriumcp sriumcp added kind/enhancement New feature or request area/analytics Metrics, statistical estimation, and bandit algorithms for traffic shifting area/controller area/tasks Iter8 tasks labels Aug 9, 2021
@sriumcp sriumcp changed the title Get rid of versionInfo based templating in tasks and metrics Get rid of versionInfo based templating in tasks and metrics and experiment.spec Aug 9, 2021
@sriumcp sriumcp changed the title Get rid of versionInfo based templating in tasks and metrics and experiment.spec Get rid of versionInfo based templating. Get rid of versionInfo field from tasks and experiment.spec. Aug 9, 2021
@sriumcp
Copy link
Member Author

sriumcp commented Aug 9, 2021

Note: Please see #942

@sriumcp
Copy link
Member Author

sriumcp commented Aug 11, 2021

with condition

- if: WinnerFound()
  run: kubectl apply -f https://baseline.com.yaml
- if: not WinnerFound()
  run: kubectl apply -f https://candidate.com.yaml

with version info

run: kubectl apply -f https://{{ WinnerOrFirst | manifest }}.com.yaml
versionInfo:
- manifest: baseline
- candidate: candidate

We will start with conditions. We will always have the option of introducing versionInfo as above, through non version-breaking CRD changes.

@sriumcp
Copy link
Member Author

sriumcp commented Aug 11, 2021

{{ .Name }}
{{ .Namespace }}
{{ .Status.winner.whatever }} # this will fail with template execution error

@sriumcp
Copy link
Member Author

sriumcp commented Aug 11, 2021

We want Secret method as part of template execution.

# better errors bacause you can customize it within the Secret method
run: git clone https://sriumcp:{{ .Secret 'token' }}@github.com/iter8-tools/myrepo.git

@sriumcp
Copy link
Member Author

sriumcp commented Aug 11, 2021

go Struct embedding to achieve the above ...

type ExperimentWithSecret struct {
  Experiment
  Secret
}

@kalantar
Copy link
Member

An implication of this issue is the use of tasks to get and set weights in tasks. Is that correct? This was described in the now closed issue #941.

@sriumcp
Copy link
Member Author

sriumcp commented Aug 12, 2021

Yes, this is correct.

We can reopen a separate issue for this task.

@kalantar kalantar mentioned this issue Aug 12, 2021
2 tasks
@kalantar
Copy link
Member

An implication of this issue is the use of tasks to get and set weights in tasks. Is that correct?

Yes, this is correct.

Created issue #970 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/analytics Metrics, statistical estimation, and bandit algorithms for traffic shifting area/tasks Iter8 tasks kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants