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

fix: improve CI output #52

Merged
merged 2 commits into from
Oct 29, 2024
Merged

fix: improve CI output #52

merged 2 commits into from
Oct 29, 2024

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Oct 24, 2024

  • add onlyShowAtEndInCI config prop so that consumers can choose for information to only be shown at the very end when in CI
  • Don't repeat stage headers when receiving updates to stage specific infos
  • Reprint stage or stage specific infos after 5 minutes (configurable with OCLIF_CI_HEARTBEAT_FREQUENCY_MS or SF_CI_HEARTBEAT_FREQUENCY_MS)
  • Throttle new information every 5 seconds (configurable with OCLIF_CI_UPDATE_FREQUENCY_MS or SF_CI_UPDATE_FREQUENCY_MS)

forcedotcom/cli#3079
@W-17060727@

@mdonnalley mdonnalley force-pushed the mdonnalley/ci-improvements branch from 05f9ecd to 63865a5 Compare October 24, 2024 21:11
@mdonnalley mdonnalley changed the title fix: never repeat current stage in CI mode fix: improve CI output Oct 25, 2024
@cristiand391
Copy link
Member

QA notes:

setup:
tested a few via bin/run.js project deploy start on dreamhouse and the sf-specific deploy example in this repo (mostly to test the new features with bunch of updates on multiple stages).

✅ stage headers aren't duplicated on data updates
✅ can configure reprint stage info via SF_CI_HEARTBEAT_FREQUENCY_MS
SF_CI_HEARTBEAT_FREQUENCY_MS lower than the deploy poll interval, I can see previous data being printed, if new data comes in the frequency is still respected
SF_CI_UPDATE_FREQUENCY_MS throttles new info frequency, setting it to 10000 on a small deploy I only see the start and the finished update after 10s
✅ stages with onlyShowAtEndInCI are rendered at the end of stages when it finished.

@cristiand391 cristiand391 merged commit d3bb362 into main Oct 29, 2024
11 checks passed
@rasmuszimmer
Copy link

@cristiand391 we are trying to use SF_CI_HEARTBEAT_FREQUENCY_MS to slow down theoutput in our Azure Pipelines console. Do you have any pointers on how to set it? We tried just setting as env var but seemed to not have any effect..

@cristiand391
Copy link
Member

cristiand391 commented Nov 7, 2024

@rasmuszimmer
setting it as an env var should work, are you setting the value to miliseconds? here's an example:
sf v2.65.8 (current stable release):

383990580-22d25d52-83eb-4171-9198-77e2b346b7b6.mov

NOTE
I'm setting CI=true manually to force CI output, Azure Pipelines or any other CI provider likely have CI env var set.

@avesolovksyy
Copy link

@cristiand391
From our practical experiments, to make it work in Azure DevOps, you really need to set CI=true explicitly.
Don't know about other CI providers.
Could you please mention CI=true in SFDX guide, in section with env variables described.
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants