Skip to content

Conversation

@elazarlachkar
Copy link
Contributor

@elazarlachkar elazarlachkar commented Sep 9, 2025

Description

When branch names include /, the CI fails when trying to upload an artifact:

Invalid characters include:  Double quote ", Colon :, Less than <, Greater than >, Vertical bar |, Asterisk *, Question mark ?, Carriage return \r, Line feed \n, Backslash \, Forward slash /

See example:

Error: The artifact name is not valid: report_postgres_fix/replace-double-quotes-with-single-quotes_dbt_.html. Contains the following character:  Forward slash /

This PR fixes it by replacing all the invalid characters with _.

Summary by CodeRabbit

  • Chores
    • CI artifacts now use dynamic, sanitized names that include warehouse type, branch, and dbt version.
    • Report uploads use descriptive, normalized filenames for easier identification.
    • Log uploads use consistent, lowercase, sanitized filenames to avoid invalid characters and conflicts.
    • Improves artifact clarity across branches and configurations without changing workflow behavior.

@elazarlachkar elazarlachkar self-assigned this Sep 9, 2025
@linear
Copy link

linear bot commented Sep 9, 2025

@coderabbitai
Copy link

coderabbitai bot commented Sep 9, 2025

Walkthrough

The GitHub Actions workflow .github/workflows/test-warehouse.yml now constructs sanitized, lowercase artifact names from warehouse-type, BRANCH_NAME, and dbt-version. Two new steps emit artifact_name outputs for the report and EDR log, and the upload steps use those dynamic outputs. No other workflow behavior changed.

Changes

Cohort / File(s) Summary of Changes
Workflow artifact naming
.github/workflows/test-warehouse.yml
Added two steps to compute sanitized, lowercase artifact names (report_<warehouse-type>_<BRANCH_NAME>_dbt_<dbt-version>.html and edr_<warehouse-type>_<BRANCH_NAME>_dbt_<dbt-version>.log), export them via GITHUB_OUTPUT, and replaced static upload artifact names with the computed ${{ steps.<...>.outputs.artifact_name }}.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GH as GitHub Actions
    participant SR as set_report_artifact_name
    participant UR as Upload report
    participant SA as set_artifact_name
    participant UL as Upload EDR log

    GH->>SR: run step with inputs (warehouse-type, BRANCH_NAME, dbt-version)
    SR-->>GH: output artifact_name (sanitized, lowercase)
    GH->>UR: upload report using steps.set_report_artifact_name.outputs.artifact_name

    GH->>SA: run step with same inputs
    SA-->>GH: output artifact_name (sanitized, lowercase)
    GH->>UL: upload EDR log using steps.set_artifact_name.outputs.artifact_name

    rect rgb(240, 248, 255)
    note right of SR: normalization: lowercase + replace disallowed chars with _
    note right of SA: same normalization
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • fix test dwh write dbt profies #1999 — Modifies .github/workflows/test-warehouse.yml similarly to generate sanitized, lowercased artifact/profile/schema names from warehouse-type, branch, and dbt version.

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title clearly summarizes the primary change by stating that invalid characters will be handled when uploading CI artifacts, which aligns with the changeset that sanitizes artifact names in the workflow. It is concise, specific to the main issue (artifact upload errors due to invalid characters), and avoids extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I am a rabbit, quick and bright,
I lowercase names by day and night.
I swap odd chars to underscore, neat,
Then hop to upload — tidy and fleet. 🥕✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5ae0ada and 93d7921.

📒 Files selected for processing (1)
  • .github/workflows/test-warehouse.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-warehouse.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test / test
  • GitHub Check: code-quality
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ele-5052-oss-fix-ci-artifact-upload

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

👋 @elazarlachkar
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/test-warehouse.yml (2)

197-202: Good switch to a sanitized, dynamic artifact name.

The upload step correctly consumes the computed output; name collisions from unsafe characters should be resolved.

Optionally add:

  • if-no-files-found: error (or warn) to make intent explicit
  • retention-days: 7 (or your policy)

242-242: LGTM on wiring the dynamic name into upload.

Consistent with the report artifact step.

Consider capping name length (e.g., | head -c 120) to future-proof against very long branch names.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 44f8f8a and ae6f024.

📒 Files selected for processing (1)
  • .github/workflows/test-warehouse.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: code-quality

Copy link
Contributor

@NoyaArie NoyaArie left a comment

Choose a reason for hiding this comment

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

👍🏼

@elazarlachkar elazarlachkar merged commit a1c31f6 into master Sep 10, 2025
6 checks passed
@elazarlachkar elazarlachkar deleted the ele-5052-oss-fix-ci-artifact-upload branch September 10, 2025 10:48
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.

3 participants