Skip to content

Feat/multi job charm publish#933

Open
yanksyoon wants to merge 8 commits intomainfrom
feat/multi-job-charm-publish
Open

Feat/multi job charm publish#933
yanksyoon wants to merge 8 commits intomainfrom
feat/multi-job-charm-publish

Conversation

@yanksyoon
Copy link
Copy Markdown
Member

Applicable spec:

Overview

Rationale

  • To upload all artifacts published by the charm

Workflow Changes

Checklist

@yanksyoon yanksyoon requested a review from a team as a code owner February 12, 2026 04:00
@yanksyoon yanksyoon requested review from f-atwi and florentianayuwono and removed request for a team February 12, 2026 04:00
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 129 files.

Valid Invalid Ignored Fixed
31 1 97 0
Click to see the invalid file list
  • eslint.config.js
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

eslint.config.js Outdated
@@ -0,0 +1,34 @@
// Flat ESLint config for ESLint v10
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.

Suggested change
// Flat ESLint config for ESLint v10
/*
* Copyright 2026 Canonical Ltd.
* See LICENSE file for licensing details.
*/
// Flat ESLint config for ESLint v10

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 144 files.

Valid Invalid Ignored Fixed
31 1 112 0
Click to see the invalid file list
  • eslint.config.cjs
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,77 @@
// ESLint v9 flat config (CommonJS)
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.

Suggested change
// ESLint v9 flat config (CommonJS)
/*
* Copyright 2026 Canonical Ltd.
* See LICENSE file for licensing details.
*/
// ESLint v9 flat config (CommonJS)

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 144 files.

Valid Invalid Ignored Fixed
31 1 112 0
Click to see the invalid file list
  • eslint.config.cjs
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@@ -0,0 +1,77 @@
// ESLint v9 flat config (CommonJS)
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.

Suggested change
// ESLint v9 flat config (CommonJS)
/*
* Copyright 2026 Canonical Ltd.
* See LICENSE file for licensing details.
*/
// ESLint v9 flat config (CommonJS)

@github-actions
Copy link
Copy Markdown
Contributor

Test results for commit 75c7427

Test coverage for 75c7427

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-02-12 06:06:47.151169+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Copy Markdown
Contributor

Test results for commit 75c7427

Test coverage for 75c7427

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-02-12 06:06:46.402747+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Copy Markdown
Contributor

Test results for commit 75c7427

Test coverage for 75c7427

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-02-12 06:08:41.272993+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Copy Markdown
Contributor

Test results for commit 75c7427

Test coverage for 75c7427

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-02-12 06:06:47.151169+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Copy Markdown
Contributor

Test results for commit 75c7427

Test coverage for 75c7427

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-02-12 06:06:46.402747+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Copy Markdown
Contributor

Test results for commit 75c7427

Test coverage for 75c7427

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-02-12 06:08:41.272993+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions
Copy link
Copy Markdown
Contributor

Unused entries in .trivyignore

Image: ghcr.io/canonical/test-foo:73ebae26eaf71e0462669ed86b00b03f1351934e-_1.0_amd64

The following CVEs are in .trivyignore but not ignored by Trivy anymore:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for discovering and publishing multiple charm artifacts produced across multiple integration-test workflow runs, and updates ESLint configuration to resolve linting errors.

Changes:

  • Aggregate .charm artifacts across successful integration workflow runs for the current commit.
  • Migrate ESLint to a v9 flat config and simplify npm run lint.
  • Minor output/serialization tweaks for plan/run-id outputs.

Reviewed changes

Copilot reviewed 8 out of 41 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/publish.ts Adds cross-workflow-run charm artifact aggregation and de-duplication before publish.
src/plan.ts Adjusts artifact name sanitization and imports crypto for ID generation.
src/get-plan.ts Ensures outputs are serialized as strings (plan, run-id).
package.json Updates lint script, ESLint version, and adds package type.
internal/publish/action.yaml Adds optional integration-workflow-file input for aggregation.
eslint.config.cjs Introduces ESLint v9 flat config (replacing .eslintignore).
docs/changelog.md Documents the new aggregation feature and ESLint changes.
.eslintignore Removed in favor of flat config ignores.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"test": "npx jest",
"all": "npm run format:write && npm run lint && npm run test && npm run coverage && npm run package"
},
"type": "module",
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

Setting "type": "module" makes all .js files in this package ESM by default, which can break GitHub Action runtime and/or the ncc bundled output if it is emitted as CommonJS (typical ncc output uses require/module.exports). Consider removing this, or ensure the built entrypoints in dist use .cjs (or otherwise guarantee ESM-compatible output).

Suggested change
"type": "module",

Copilot uses AI. Check for mistakes.
repo,
workflow_id: workflowId,
per_page: 100,
status: 'success'
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

This paginates through all successful runs of the workflow, which can be very slow and may hit rate limits on repos with many historical runs. Prefer narrowing the query by passing + "head_sha: github.context.sha" + (supported by listWorkflowRuns) and/or avoid full pagination (e.g., fetch only the first page until a match is found).

Suggested change
status: 'success'
status: 'success',
head_sha: github.context.sha

Copilot uses AI. Check for mistakes.
} catch (e) {
core.info(
`Failed downloading artifact ${art.name} from run ${run.id}: ${String(e)}`
)
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

Temporary directories created per artifact are never cleaned up. Over multiple runs/artifacts this can leak disk space in the runner. Add a + "finally" + block that removes + "tmp" + (recursive) once scanning is done, regardless of success/failure.

Suggested change
)
)
} finally {
try {
fs.rmSync(tmp, { recursive: true, force: true })
} catch {
// Ignore cleanup errors
}

Copilot uses AI. Check for mistakes.
module.exports = [
// Migrate from .eslintignore
{
ignores: ['lib/', 'dist/', 'node_modules/', 'coverage/', '**/*.json']
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

The flat config ignores + "/*.json" + globally, but the same file later defines rules for JSON files ( + "files: ['/.json']" + ). With the ignore in place, JSON linting/formatting rules will never run. Remove + "'**/.json'" + from ignores if you intend to lint JSON.

Suggested change
ignores: ['lib/', 'dist/', 'node_modules/', 'coverage/', '**/*.json']
ignores: ['lib/', 'dist/', 'node_modules/', 'coverage/']

Copilot uses AI. Check for mistakes.

## 2026-02-12

- Fix ESLint workflow due to ESLint 10.0.0 release.
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

The changelog line references fixing issues due to ESLint 10.0.0, but this PR pins ESLint to + "^9.0.0" + and adds a v9 flat config. Consider rewording to reflect the actual change (e.g., migrating to flat config / aligning with ESLint v9) to avoid confusion.

Suggested change
- Fix ESLint workflow due to ESLint 10.0.0 release.
- Update ESLint workflow to pin ESLint to `^9.0.0` and use the v9 flat config.

Copilot uses AI. Check for mistakes.
"./__tests__",
"./coverage"
]
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

maybe we can add eof?

@javierdelapuente
Copy link
Copy Markdown
Contributor

Mmm, will this work correctly it the charms have images and resources?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants