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

Cirrus: Omit functions in env. file #17458

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

cevich
Copy link
Member

@cevich cevich commented Feb 9, 2023

The localbenchmarks() function stores a .env file containing current environment variables for benchmark-classification purposes. However its naked use of printenv means it was logging the contents of library functions and (worse) trying to stort all the lines. This results in an unusable mess inside benchmarks.env. Fix this by re-using the purpose-built passthrough_envars() which is designed to only print useful, safe, env. vars.

Also

The benchmarks.env file is intended for machine consumption. Including things like a kB unit label (like $MEMTOTAL) make items difficult to parse. Additionally, multi-value keys (like $UNAME_RM) make extra/unnecessary work for the interpreter. Simplify these items and include a data-schema version marker so an interpreter can be made aware/support future format changes.

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none labels Feb 9, 2023
@rhatdan
Copy link
Member

rhatdan commented Feb 9, 2023

LGTM
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cevich, rhatdan

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2023
@cevich
Copy link
Member Author

cevich commented Feb 9, 2023

Sorry dan, not quite ready yet. I'll un-draft this when it's complete.

@cevich cevich changed the title Cirrus: Omit functions in env. file [WIP] Cirrus: Omit functions in env. file Feb 9, 2023
@cevich cevich force-pushed the fix_benchmarks_env branch from d6aa21a to d16a28f Compare February 9, 2023 21:39
The `localbenchmarks()` function stores a `.env` file containing current
environment variables for benchmark-classification purposes.  However its
naked use of `printenv` means it was logging the contents of library
functions and (worse) trying to stort all the lines.  This results in an
unusable mess inside `benchmarks.env`.  Fix this by re-using the
purpose-built passthrough_envars() which is designed to only print
useful, safe, env. vars.

Signed-off-by: Chris Evich <[email protected]>
@cevich cevich force-pushed the fix_benchmarks_env branch from d16a28f to 655441f Compare February 10, 2023 17:07
The `benchmarks.env` file is intended for machine consumption.
Including things like a `kB` unit label (like `$MEMTOTAL`) make items
difficult to parse.  Additionally, multi-value keys (like `$UNAME_RM`)
make extra/unnecessary work for the interpreter.  Simplify these items
and include a data-schema version marker so an interpreter can be made
aware/support future format changes.

Signed-off-by: Chris Evich <[email protected]>
@cevich cevich force-pushed the fix_benchmarks_env branch from 655441f to 45fb353 Compare February 10, 2023 18:58
@cevich cevich changed the title [WIP] Cirrus: Omit functions in env. file Cirrus: Omit functions in env. file Feb 14, 2023
@cevich cevich marked this pull request as ready for review February 14, 2023 18:39
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 14, 2023
@cevich
Copy link
Member Author

cevich commented Feb 14, 2023

This is ready now.

@cevich
Copy link
Member Author

cevich commented Feb 16, 2023

@containers/podman-maintainers PTAL - this is needed so we can capture intelligible environment details along with the benchmark data.

@Luap99
Copy link
Member

Luap99 commented Feb 16, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2023
@openshift-merge-robot openshift-merge-robot merged commit 5d78547 into containers:main Feb 16, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2023
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. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants