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

github-action runs cleanup command immediately #11

Open
rwc9u opened this issue Jun 21, 2023 · 0 comments
Open

github-action runs cleanup command immediately #11

rwc9u opened this issue Jun 21, 2023 · 0 comments

Comments

@rwc9u
Copy link

rwc9u commented Jun 21, 2023

It seems like the harness github action step is running the cleanup commands immediately so it's not taking into account other github actions steps in the same stage.

For example in GHA if I have marketplace actions Foo and Bar then an example in the following steps I call

Calling Foo
Calling Bar
Another Step In My Job
Post Calling Bar
Post Calling Foo

In Harness I'm seeing the following occur

Calling Foo
Post Calling Foo
Calling Bar
Post Calling Bar
Another Step In My Job

This affected us when we tried to login to ECR

Enumerating objects: 32, done.
Counting objects:   3% (1/32)
Compressing objects: 100% (30/30), done.
Total 32 (delta 2), reused 16 (delta 1), pack-reused 0
time=2023-05-25T22:36:59.910Z level=INFO msg="detected github action action.yml"
[drone-github-action/action]   ☁  git clone 'https://github.com/aws-actions/amazon-ecr-login' # ref=v1
[drone-github-action/action] ⭐ Run Main before
[drone-github-action/action]   ✅  Success - Main before
[drone-github-action/action] ⭐ Run Main aws-actions/amazon-ecr-login@v1
[drone-github-action/action]   | (node:5564) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
[drone-github-action/action]   | 
[drone-github-action/action]   | Please migrate your code to use AWS SDK for JavaScript (v3).
[drone-github-action/action]   | For more information, check the migration guide at https://a.co/7PzMCcy
[drone-github-action/action]   | (Use `node --trace-warnings ...` to show where the warning was created)
[drone-github-action/action]   | Logging into registry xxx.dkr.ecr.us-east-1.amazonaws.com
[drone-github-action/action]   💬  ::debug::'skip-logout' is false for 1 registries.
[drone-github-action/action]   ✅  Success - Main aws-actions/amazon-ecr-login@v1
[drone-github-action/action]   ⚙  ::set-output:: registry=xxx.dkr.ecr.us-east-1.amazonaws.com
[drone-github-action/action]   ⚙  ::set-output:: docker_username_xxx_dkr_ecr_us_east_1_amazonaws_com=AWS
[drone-github-action/action]   ⚙  ::set-output:: docker_password_xxx_dkr_ecr_us_east_1_amazonaws_com=REDACTED
[drone-github-action/action] ⭐ Run Main output variables
[drone-github-action/action]   ✅  Success - Main output variables
[drone-github-action/action] ⭐ Run Main after
[drone-github-action/action]   ✅  Success - Main after
[drone-github-action/action] ⭐ Run Post aws-actions/amazon-ecr-login@v1
[drone-github-action/action]   | Logging out of registry xxx.dkr.ecr.us-east-1.amazonaws.com
[drone-github-action/action]   ✅  Success - Post aws-actions/amazon-ecr-login@v1
[drone-github-action/action] 🏁  Job succeeded

The unwinding of composite GHAs is not working as expected. For the above we used the work around of

with:
  skip-logout: true

to get it to keep me logged in, but other actions aren't as easily fixed.

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

No branches or pull requests

1 participant