elastic / package-storage

Package storage for packages served through the package registry service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Security Detection Engine Package Promotion Error: "Author Required"

terrancedejesus opened this issue · comments

Description

TRADE is currently attempting to promote a package (security_detection_engine - 7.16.4) from snapshot to staging with the elastic package tool as such.

elastic-package promote -v -> snapshot-to-staging -> select security_detection_engine-7.16.4.

The following error is being produced:

2022/08/17 11:48:04 DEBUG Checkout source stage: snapshot
2022/08/17 11:48:05 DEBUG Load package resources from source stage
2022/08/17 11:48:05 DEBUG Checkout destination stage: staging
2022/08/17 11:48:06 DEBUG Create new destination branch: promote-from-snapshot-to-staging-1660751284541229000
2022/08/17 11:48:06 DEBUG Write package resources to destination branch
2022/08/17 11:48:06 DEBUG Add package resources to index
2022/08/17 11:48:06 DEBUG Commit changes to destination branch
Error: copying packages failed (source: snapshot, destination: staging): committing files failed (stage: promote-from-snapshot-to-staging-1660751284541229000): author field is required

We are not entirely sure what the error may originating from based on this failure message. These lines of code is where the failure seems to happen.

Digging a bit deeper this seems to be an error generated from Github related to this line of code where the Github error is being returned?

Below is the original snapshot PR that passed tests and auto-merged:

After tracing this down to where the error originates from, that being GitHub in this instance, I then re-installed Git locally, setup my credentials globally, created a new PAT token and then re-tried. The "author field is required" error was gone but then the following error was produced.

Error: opening PR with promoted packages failed (head: promote-from-snapshot-to-staging-1660753106619904000, base: staging): opening pull request failed: POST https://api.github.com/repos/elastic/package-storage/pulls: 403 Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization. []

Re-visiting the PAT token I had, I enabled the following, not exactly sure which one did the trick.

  • admin:org
  • write:packages
  • admin:org_hook
  • user
  • project

Previously I had "public_repo", "read:user" and "user:email" enabled as instructed by the elastic package README but more seems to be needed.