archethic-foundation / archethic-foundation/aeweb-github-action

Application crash when no files are updated

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Describe the problem you discovered

When an action runs and there is no modification to the content of the files to upload, the application crash:
```
Connecting to Archethic endpoint...
Fetching keychain...
Keychain loaded with the funding/website services
Check last update...
Analyzing website folder...
Building files transactions...
Building reference transaction...
TypeError: Cannot read properties of undefined (reading 'forEach')
at getRefTxContent (file:///aeweb_action/node_modules/@archethicjs/aeweb-cli/lib/utils.js:77:18)
at AEWeb.getRefTransaction (file:///aeweb_action/node_modules/@archethicjs/aeweb-cli/lib/api.js:83:[24](https://github.com/archethic-foundation/archethic-website/actions/runs/11010031496/job/30589600319#step:7:25))
at handler (file:///aeweb_action/src/action.js:136:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///aeweb_action/index.js:46:3
```

### Describe the solution you'd like

The application should log that there is not update and close normally.

Notice that there is a possibility that only the ssl certificates are updated

### Epic

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/action.js around line 136 and trace the getRefTransaction call shown in the stack trace, including getRefTxContent in @archethicjs/aeweb-cli/lib/utils.js. Verify the GitHub Action behavior when no files change; done means it logs that there is no update, exits normally, and still permits SSL-certificate-only updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.