Skip to content

fix: sweep only test - #1044

Open
tng1-equinix wants to merge 3 commits into
mainfrom
sweeper-fix
Open

tng1-equinix wants to merge 3 commits into
mainfrom
sweeper-fix

Conversation

@tng1-equinix

Copy link
Copy Markdown
Contributor

With our current pipeline, it is possible (likely even), that a test suite ends earlier than the other, which causes it to sweep all of the resources, which causes another test suite to fail

Copilot AI review requested due to automatic review settings July 6, 2026 14:17
@tng1-equinix
tng1-equinix requested review from a team as code owners July 6, 2026 14:17

Copilot AI 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.

Pull request overview

This PR aims to prevent Fabric sweeper jobs from deleting resources created by other parallel acceptance test suites by scoping sweeping to a specific test “target” via an environment variable.

Changes:

  • Added SWEEP_TARGET-based filtering to Fabric sweeper resource-name matching.
  • Set SWEEP_TARGET values in the Fabric acceptance-test GitHub Actions workflow sweeper steps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
internal/sweep/sweep.go Introduces SWEEP_TARGET filtering for determining which Fabric test resources are sweepable.
.github/workflows/fabric_acctest.yml Sets SWEEP_TARGET per sweeper job to scope deletion to the corresponding test suite.

Comment thread internal/sweep/sweep.go
Comment on lines +30 to +32
if v := os.Getenv("SWEEP_TARGET"); v != "" {
return strings.HasSuffix("_"+resourceName, v)
}
Comment thread .github/workflows/fabric_acctest.yml Outdated
@apiiro

apiiro Bot commented Jul 6, 2026

Copy link
Copy Markdown

WORKFLOW-25 · Pull Request Comments for Secrets Scanning

Workflows: "WORKFLOW-25 · Pull Request Comments for Secrets Scanning"
Policies: "Exposed Secrets with Unknown Validity in Public, Applicative Code - High", "Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium"

⚠️ Apiiro found 7 new risks - 7 medium ⚠️

🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Tests
  • Appearances: Appears 1 time in the file
  • Preview: root*password = "•••••"`, ctx) line 1536
  • Insights: Public repository, Test logic
🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Documentation
  • Appearances: Appears 1 time in the file
  • Preview: password = "•••••" line 17
  • Insights: Public repository
🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Tests
  • Appearances: Appears 1 time in the file
  • Preview: admin*password = "•••••"`, ctx) line 1520
  • Insights: Public repository, Test logic
🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Tests
  • Appearances: Appears 1 time in the file
  • Preview: root*password = "•••••"`, ctx) line 1494
  • Insights: Public repository, Test logic
🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Tests
  • Appearances: Appears 1 time in the file
  • Preview: password = "•••••" line 57
  • Insights: Public repository, Test logic
🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Tests
  • Appearances: Appears 1 time in the file
  • Preview: networkSSHUserSchemaNames["Password"]: "•••••", line 16
  • Insights: Public repository, Test logic
🟠 Medium: Exposed Secrets with Unknown Validity in Test or Documentation Files - Medium in secret of type User password
  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Tests
  • Appearances: Appears 1 time in the file
  • Preview: admin*password = "•••••"`, ctx) line 1478
  • Insights: Public repository, Test logic

⚠️ Apiiro found 1 resolved risk - 1 high ⚠️

🔴 High: Exposed Secrets with Unknown Validity in Public, Applicative Code - High in secret of type User password

  • Secret type: User password (Generic)
  • Validity: No validator
  • Exposure: Exposed
  • File type: Unclassified
  • Appearances: Appears 1 time in the file
  • Preview: password = "•••••" line 17
  • Insights: Public repository

Repository: terraform-provider-equinix
Applications: ORG - EQUINIX,PROJ: PUBLIC-OPENSOURCE (Auto)

View in Apiiro

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.52%. Comparing base (90fa10d) to head (31e5aba).

Files with missing lines Patch % Lines
internal/sweep/sweep.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1044       +/-   ##
===========================================
+ Coverage   28.27%   72.52%   +44.24%     
===========================================
  Files         175      175               
  Lines       21742    21744        +2     
===========================================
+ Hits         6148    15769     +9621     
+ Misses      15465     5084    -10381     
- Partials      129      891      +762     

☔ View full report in Codecov by Harness.
📢 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.

@displague displague mentioned this pull request Jul 6, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: tng1-equinix <tng1@ap.equinix.com>

This branch was previously deployed

1 inactive deployment
internal 31e5abab Deployed Jul 8, 2026 by tng1-equinix via authorize #2746
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.

2 participants