Skip to content
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

Add archive-retention-days as an input for the reusable workflows #46

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petecheslock
Copy link
Contributor

This is mostly so that our demo projects can be set with a much longer retention window so that we don't need to continually re-generate the archives. But i'm sure others may want this feature to be adjustable more easily.

@github-actions
Copy link

AppMap pull request analysis

Summary Status
Failed tests ✅ All tests passed
API changes 0️⃣ No API changes
Security flaws ✅ None detected
Performance problems ✅ None detected
Code anti-patterns ✅ None detected
New AppMaps 0️⃣ No new AppMaps
Changed AppMaps 0️⃣ No changes

@petecheslock
Copy link
Contributor Author

Doing some testing it didn't appear as if the asset retention was being set. In this build
https://github.com/land-of-apps/rails_tutorial_sample_app_7th_ed/actions/runs/6671807986

I removed the reusable workflow for the moment and just did bare commands here

When the build finished this asset was created: https://github.com/land-of-apps/rails_tutorial_sample_app_7th_ed/suites/17701361097/artifacts/1013140614

I queried the GH api to check the expiration and it returned:

curl  -H "Accept: application/vnd.github+json" -H "Authorization: Bearer MY_SECRET_TOKEN" https://api.github.com/repos/land-of-apps/rails_tutorial_sample_app_7th_ed/actions/artifacts/1013140614
{
  "id": 1013140614,
  "node_id": "MDg6QXJ0aWZhY3QxMDEzMTQwNjE0",
  "name": "appmap-archive-full_e7d9cb320760078471ba34ccd7e5aa5dc09683d6.tar",
  "size_in_bytes": 1945600,
  "url": "https://api.github.com/repos/land-of-apps/rails_tutorial_sample_app_7th_ed/actions/artifacts/1013140614",
  "archive_download_url": "https://api.github.com/repos/land-of-apps/rails_tutorial_sample_app_7th_ed/actions/artifacts/1013140614/zip",
  "expired": false,
  "created_at": "2023-10-27T20:14:22Z",
  "updated_at": "2023-10-27T20:14:23Z",
  "expires_at": "2023-11-03T20:14:03Z",
  "workflow_run": {
    "id": 6671807986,
    "repository_id": 612227383,
    "head_repository_id": 612227383,
    "head_branch": "feat/update-controllers",
    "head_sha": "e7d9cb320760078471ba34ccd7e5aa5dc09683d6"
  }
}

@kgilpin kgilpin marked this pull request as draft November 3, 2023 21:02
@kgilpin
Copy link
Contributor

kgilpin commented Nov 3, 2023

Sounds like we should investigate the archive-retention-days option before merging this.

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