Skip to content

🌱 fix(ci): sanitize env for asciinema upload #1925

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
merged 1 commit into from
Apr 18, 2025

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Apr 16, 2025

Description

Fix the issue:

Run make demo-update
./hack/demo/generate-asciidemo.sh -u -n catalogd-demo catalogd-demo-script.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
100  5481  100  5481    0     0    997      0  0:00:05  0:00:05 --:--:--  1277
asciinema: recording asciicast to /tmp/generate-asciidemo.f1eh[6](https://github.com/operator-framework/operator-controller/actions/runs/14495113504/job/40670980647?pr=1924#step:5:7)/catalogd-demo.cast
asciinema: exit opened program when you're done
asciinema: recording finished
asciinema: asciicast saved to /tmp/generate-asciidemo.f1eh6/catalogd-demo.cast
asciinema: upload failed: Invalid asciicast: {"errors":{"env":["must include only string values"]}}
make: *** [Makefile:421: demo-update] Error 1
Error: Process completed with exit code 2.

Example: https://github.com/operator-framework/operator-controller/actions/runs/14495113504/job/40670980647?pr=1924

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@camilamacedo86 camilamacedo86 requested a review from a team as a code owner April 16, 2025 17:33
Copy link

netlify bot commented Apr 16, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 3df2b97
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/68009d3765623c000870908c
😎 Deploy Preview https://deploy-preview-1925--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@camilamacedo86 camilamacedo86 changed the title fix(ci): sanitize env for asciinema upload WIP: fix(ci): sanitize env for asciinema upload Apr 16, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 16, 2025
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.01%. Comparing base (543f099) to head (3df2b97).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1925      +/-   ##
==========================================
- Coverage   66.06%   66.01%   -0.05%     
==========================================
  Files          70       70              
  Lines        6182     6182              
==========================================
- Hits         4084     4081       -3     
- Misses       1839     1841       +2     
- Partials      259      260       +1     
Flag Coverage Δ
e2e 45.09% <ø> (-0.07%) ⬇️
unit 55.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@camilamacedo86 camilamacedo86 force-pushed the fix-ci-demo branch 3 times, most recently from 69de856 to 9062824 Compare April 16, 2025 18:47
@camilamacedo86 camilamacedo86 changed the title WIP: fix(ci): sanitize env for asciinema upload 🌱 fix(ci): sanitize env for asciinema upload Apr 16, 2025
@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 Apr 16, 2025
@tmshort
Copy link
Contributor

tmshort commented Apr 16, 2025

On an unrelated note, is there a reason why we are regenerating this ascii demo as a pre-submit job, which could easily break things? Why not a post-submit job?

Change script that generates demo to cleanup envvars to avoid
issue faced in the CI to upload the records.
PATH="$PATH" \
TERM="xterm-256color" \
SHELL="/bin/bash" \
make demo-update
Copy link
Contributor Author

@camilamacedo86 camilamacedo86 Apr 17, 2025

Choose a reason for hiding this comment

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

Hi @tmshort

(Yes, I know env -i starts with an empty environment. Do you know what's in the existing CI's environment that's causing a problem?)

The fix keeps only the required ENV VARs, so future GitHub changes won’t break anything. For example, I couldn’t reproduce the issue locally (macOS) with the current code.

I didn’t dive deep into the exact ENV differences**—Because today it’s ENV A, tomorrow ENV B.** The goal was just to unblock us and avoid this from happening again. If we want to rethink the approach, we can always do that in a future PR. Personally, I don’t think it’s worth spending more time here on this one.

Let me know if anything seems off!

Copy link
Contributor

Choose a reason for hiding this comment

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

It works locally for me on linux... but the question is, why is the CI environment "off"?

@camilamacedo86 camilamacedo86 requested a review from tmshort April 17, 2025 06:23
@tmshort
Copy link
Contributor

tmshort commented Apr 18, 2025

I would at least like us to consider that this should be a post-submit job, and that it shouldn't block PRs... (not that it does right now)

Copy link
Contributor

@tmshort tmshort left a comment

Choose a reason for hiding this comment

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

/lgtm
(To at least avoid the red ❌ )

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 18, 2025
@tmshort tmshort added this pull request to the merge queue Apr 18, 2025
Merged via the queue into operator-framework:main with commit 02fa296 Apr 18, 2025
18 of 19 checks passed
@tmshort
Copy link
Contributor

tmshort commented Apr 18, 2025

This has not fixed the Ci... :(

@camilamacedo86 camilamacedo86 deleted the fix-ci-demo branch April 22, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants