Skip to content

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

Merged
tmshort merged 1 commit into
operator-framework:mainfrom
camilamacedo86:fix-ci-demo
Apr 18, 2025
Merged

🌱 fix(ci): sanitize env for asciinema upload#1925
tmshort merged 1 commit into
operator-framework:mainfrom
camilamacedo86:fix-ci-demo

Conversation

@camilamacedo86

@camilamacedo86camilamacedo86 commented Apr 16, 2025

Copy link
Copy Markdown
Contributor

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 ownerApril 16, 2025 17:33
@netlify

netlifyBot commented Apr 16, 2025

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit3df2b97
🔍 Latest deploy loghttps://app.netlify.com/sites/olmv1/deploys/68009d3765623c000870908c
😎 Deploy Previewhttps://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.

@camilamacedo86camilamacedo86 changed the title fix(ci): sanitize env for asciinema uploadWIP: fix(ci): sanitize env for asciinema uploadApr 16, 2025
@openshift-ciopenshift-ciBot 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
@codecov

codecovBot commented Apr 16, 2025

Copy link
Copy Markdown

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 
FlagCoverage Δ
e2e45.09% <ø> (-0.07%)⬇️
unit55.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
camilamacedo86force-pushed the fix-ci-demo branch 3 times, most recently from 69de856 to 9062824CompareApril 16, 2025 18:47
@camilamacedo86camilamacedo86 changed the title WIP: fix(ci): sanitize env for asciinema upload🌱 fix(ci): sanitize env for asciinema uploadApr 16, 2025
@openshift-ciopenshift-ciBot 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
Comment thread.github/workflows/catalogd-demo.yaml Outdated
@tmshort

Copy link
Copy Markdown
Contributor

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

@camilamacedo86camilamacedo86Apr 17, 2025

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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"?

@tmshort

tmshort commented Apr 18, 2025

Copy link
Copy Markdown
Contributor

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)

@tmshorttmshort left a comment

Copy link
Copy Markdown
Contributor

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-ciopenshift-ciBot 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 02fa296Apr 18, 2025
@tmshort

Copy link
Copy Markdown
Contributor

This has not fixed the Ci... :(

@camilamacedo86
camilamacedo86 deleted the fix-ci-demo branch April 22, 2025 10:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@camilamacedo86@tmshort