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

imgup Fly.io App deployment overwriting AWS env vars leading to failure #78

Closed
3 tasks done
nelsonic opened this issue Jun 21, 2023 · 4 comments
Closed
3 tasks done
Assignees
Labels
BLOCKED :fire: Core team's HIGHEST priority, blocking critical work chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes tech-debt A feature/requirement implemented in a sub-optimal way & must be re-written technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Jun 21, 2023

At present the automatic continuous deployment (CD) from GitHub actions to Fly.io for the imgup app works partially.

https://imgup.fly.dev/liveview

imgup-liveview-upload-working.mov

However the REST API fails when we attempt to upload in Hoppscotch:
image

The app was recently deployed: https://fly.io/apps/imgup
image

In the logs following the failed API request we see the following error:
https://fly.io/apps/imgup/monitoring
image

[error] ** (MatchError) no match of right hand side value: {:error, "Required key: :secret_access_key is nil in config!"}

Which relates to the following line of code:

Logger.error(Exception.format(:error, e, __STACKTRACE__))

Not super informative, but we know the upload is failing due to unavailability of the AWS :secret_access_key ... 🙃

So we know what needs to be fixed ... 🤞

Todo

  • Remove the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from ci.yml:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  • Update the FLY_API_TOKEN to the dwyl account.
  • Create PR updating.
@nelsonic nelsonic added T25m Time Estimate 25 Minutes chore a tedious but necessary task often paying technical debt technical A technical issue that requires understanding of the code, infrastructure or dependencies tech-debt A feature/requirement implemented in a sub-optimal way & must be re-written BLOCKED :fire: Core team's HIGHEST priority, blocking critical work labels Jun 21, 2023
@nelsonic nelsonic self-assigned this Jun 21, 2023
@nelsonic
Copy link
Member Author

Creating a new fly.yml file as per: https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

PR #79 🙏

@nelsonic
Copy link
Member Author

Confirmed the deploy works and API works:
image

{
  "compressed_url": "https://s3.eu-west-3.amazonaws.com/imgup-compressed/zb2rhmV9nb6eHoRmdiqxtn54LmybbkBTGZ9gwBVaW8KjPGQJ2.jpg",
  "url": "https://s3.eu-west-3.amazonaws.com/imgup-original/zb2rhmV9nb6eHoRmdiqxtn54LmybbkBTGZ9gwBVaW8KjPGQJ2.jpg"
}

Original:
original

Compressed:
compressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKED :fire: Core team's HIGHEST priority, blocking critical work chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes tech-debt A feature/requirement implemented in a sub-optimal way & must be re-written technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Status: Done
Development

No branches or pull requests

1 participant