-
Notifications
You must be signed in to change notification settings - Fork 4
DOC-2235: Document the Visual pipeline editor for Redpanda Connect #651
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
Open
JakeSCahill
wants to merge
9
commits into
main
Choose a base branch
from
doc-2235-visual-pipeline-editor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
df18c29
DOC-2235: Document the Visual pipeline editor for Redpanda Connect
JakeSCahill 1a6d967
Point run-inline.js at modules/ recursively instead of one hardcoded …
JakeSCahill e02386c
Merge branch 'main' into doc-2235-visual-pipeline-editor
JakeSCahill 0dbd237
Address CodeRabbit review findings
JakeSCahill 137cc5c
Fix all screenshot-standards-lint failures and add a reusable fix tool
JakeSCahill 2e55331
Fix real formatting/screenshot bugs found in the deploy preview
JakeSCahill 861f6bb
Fix factually incorrect claim about Visual-tab behavior on invalid YAML
JakeSCahill 3047b44
Actually use doc-detective/github-action for auto-PR and auto-issue
JakeSCahill a067876
Correct act guidance after it filed a real issue during local testing
JakeSCahill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| name: Cloud console screenshot tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| environment: | ||
| description: Which environment to test | ||
| type: choice | ||
| options: [preprod, prod, both] | ||
| default: both | ||
| schedule: | ||
| # Daily at 13:00 UTC. Catches upcoming Cloud console UI changes in preprod | ||
| # before they ship to production, and keeps docs screenshots in sync. | ||
| - cron: '0 13 * * *' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| set-matrix: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| environments: ${{ steps.set.outputs.environments }} | ||
| steps: | ||
| - id: set | ||
| run: | | ||
| choice="${{ inputs.environment }}" | ||
| if [ -z "$choice" ] || [ "$choice" = "both" ]; then | ||
| echo 'environments=["preprod","prod"]' >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "environments=[\"$choice\"]" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| screenshot-test: | ||
| needs: set-matrix | ||
| name: ${{ matrix.environment }} | ||
| runs-on: ubuntu-latest | ||
| # doc-detective/github-action needs write access to open the PR (screenshot | ||
| # changed) and/or the issue (a step failed) described below — broader than | ||
| # the workflow-level `contents: read` default, scoped to just this job. | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| issues: write | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| environment: ${{ fromJson(needs.set-matrix.outputs.environments) }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Create .env file for this environment | ||
| run: | | ||
| if [ "${{ matrix.environment }}" = "preprod" ]; then | ||
| echo "CLOUD_BASE_URL=https://preprod--redpanda-cloud.netlify.app" >> tests/doc-detective/.env | ||
| echo "CLOUD_LOGIN_EMAIL=${{ secrets.PREPROD_EMAIL }}" >> tests/doc-detective/.env | ||
| echo "CLOUD_LOGIN_PASSWORD=${{ secrets.PREPROD_PASSWORD }}" >> tests/doc-detective/.env | ||
| echo "CLOUD_CLUSTER_ID=d9f1nf0d6v8fd1orsa00" >> tests/doc-detective/.env | ||
| else | ||
| echo "CLOUD_BASE_URL=https://cloud.redpanda.com" >> tests/doc-detective/.env | ||
| echo "CLOUD_LOGIN_EMAIL=${{ secrets.EMAIL }}" >> tests/doc-detective/.env | ||
| echo "CLOUD_LOGIN_PASSWORD=${{ secrets.PASSWORD }}" >> tests/doc-detective/.env | ||
| echo "CLOUD_CLUSTER_ID=cnk4fdktluj4mbfiarq0" >> tests/doc-detective/.env | ||
|
JakeSCahill marked this conversation as resolved.
|
||
| fi | ||
|
|
||
| # Runs the same tests/doc-detective/config.json used locally (see | ||
| # run-inline.js) via the official Doc Detective action instead of our | ||
| # own wrapper script, so drift/outdated-screenshot detection and | ||
| # failure reporting are handled by tooling doc-detective itself | ||
| # maintains, not custom glue here. | ||
| # | ||
| # exit_on_fail + create_issue_on_fail: a genuine test failure (e.g. a | ||
| # selector changed) both fails this job (visible at a glance in the | ||
| # Actions tab) and files an issue. On prod specifically, that's | ||
| # expected to fire until the canvas feature flag ships there — that's | ||
| # a real, if noisy, signal that the flag hasn't flipped yet. | ||
| # | ||
| # create_pr_on_change: if the run made it all the way to the | ||
| # screenshot step and the real canvas no longer matches the checked-in | ||
| # image closely enough (see maxVariation in the inline test), that | ||
| # step overwrites the file and this opens a PR with the diff. A | ||
| # reviewer still has to look at the picture before merging — this | ||
| # surfaces drift for review, it doesn't silently accept it. | ||
| # | ||
| # Known residual risk, not yet exercised end-to-end: this action | ||
| # installs its own copy of doc-detective rather than using this repo's | ||
| # node_modules, so it doesn't get the sharp/@img version-pinning fix in | ||
| # this repo's package.json overrides (see tests/doc-detective/README.md | ||
| # and https://github.com/appium/appium/issues/22554). If a fresh | ||
| # install of the action's own dependencies hits that same upstream | ||
| # conflict, the screenshot step could fail with a native module error | ||
| # unrelated to the actual docs/UI. Validate with a manual | ||
| # workflow_dispatch run before trusting the daily cron on this. | ||
| - name: Run Doc Detective | ||
| uses: doc-detective/github-action@v1 | ||
| with: | ||
| config: tests/doc-detective/config.json | ||
| exit_on_fail: true | ||
| create_pr_on_change: true | ||
| pr_branch: doc-detective-${{ matrix.environment }}-${{ github.run_id }} | ||
| pr_title: "docs: update ${{ matrix.environment }} Visual editor screenshot" | ||
| pr_body: | | ||
| A scheduled Doc Detective run against **${{ matrix.environment }}** ($RUN_URL) found the real Visual pipeline editor canvas no longer matches the checked-in screenshot closely enough, and updated it. | ||
|
|
||
| This only means pixels changed by more than the accepted threshold — review the image diff before merging, same as any other screenshot change. | ||
| pr_labels: doc-detective,${{ matrix.environment }} | ||
| create_issue_on_fail: true | ||
| issue_title: "Doc Detective failure: ${{ matrix.environment }} Visual editor test" | ||
| # Deliberately does NOT use the $RESULTS template variable: the raw | ||
| # results object embeds resolved step values, including the | ||
| # CLOUD_LOGIN_PASSWORD/CLOUD_LOGIN_EMAIL substituted into this | ||
| # test's login steps. That object goes into the issue body via a | ||
| # direct API call, bypassing GitHub's log secret-masking (which | ||
| # only scrubs step *logs*, not content posted through the API) — | ||
| # so putting it here would leak the password in plaintext into the | ||
| # issue. $RUN_URL points at the (correctly masked) run logs instead. | ||
| issue_body: | | ||
| A Doc Detective run against **${{ matrix.environment }}** failed: $RUN_URL | ||
|
|
||
| The Visual pipeline editor test in `connect-quickstart.adoc` no longer matches the real UI. Check the run logs for which step failed and why — most likely a selector changed, or (if this is the `prod` run) the canvas feature flag hasn't shipped there yet. | ||
| issue_labels: doc-detective,${{ matrix.environment }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Screenshot standards lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - '**/*.adoc' | ||
| - 'modules/shared/images/**' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Check alt text and image size | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Lint screenshots and alt text | ||
| run: node tests/doc-detective/lint-screenshots.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,5 @@ poc-docs/ | |
| docs/ | ||
| .docusaurus | ||
| .env | ||
| tests/doc-detective/last-report.json | ||
| tests/doc-detective/last-inline-report.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.