Skip to content

Conversation

@guidojw
Copy link
Member

@guidojw guidojw commented Oct 11, 2023

Checklist

  • Merged database migrations into 1 database migration.
  • Tested database migrations from origin/staging (git checkout staging ; git pull ; bundle exec rails db:reset ; git checkout BRANCH ; bundle exec rails db:migrate).

@guidojw guidojw added the refactor Wijzigingen in codebase zonder verandering van functionaliteit label Oct 11, 2023
@guidojw guidojw marked this pull request as draft October 11, 2023 21:02
@lodewiges
Copy link
Contributor

is this ready to merge?, if not what should be changed and can i do this?

@guidojw
Copy link
Member Author

guidojw commented Nov 19, 2024

is this ready to merge?, if not what should be changed and can i do this?

It is not, I'll update this comment with what's to be done later

@guidojw
Copy link
Member Author

guidojw commented Nov 21, 2024

@lodewiges it's finished now, the goal was to get RAILS_MASTER_KEY out of the ci workflow so that PRs from external forks would be able to work, but the Mollie tests call the real Mollie API and need a key for that so I compromised a little bit and kept it for the tests

Edit: it is possible to get secrets on PRs from forks, but it's kind of a hack https://michaelheap.com/access-secrets-from-forks/

@guidojw guidojw marked this pull request as ready for review November 21, 2024 23:27
@lodewiges
Copy link
Contributor

Thank you for your fixing it Guido, I understand why we still need the rails key, However should it be possible to give Mollie a fake api key when the environment is test. this requires a bit of logic in aplication.rb. But it should solve the problem I think.

@guidojw
Copy link
Member Author

guidojw commented Nov 22, 2024

With a fake api key how would the tests work? It's a real api it calls which will throw unauthorised errors then

@guidojw
Copy link
Member Author

guidojw commented Nov 22, 2024

The same compromise has to be made on amber-api, there the ImprovMX api is called in the tests.
Making these few test conditional based on if the master key exists (not in fork prs then) is something I'm considering now

@lodewiges
Copy link
Contributor

The same compromise has to be made on amber-api, there the ImprovMX api is called in the tests. Making these few test conditional based on if the master key exists (not in fork prs then) is something I'm considering now

I thought we only needed a key to initialize mollie. I was not aware that we needed to used the production key

@codecov
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.17%. Comparing base (5c1018a) to head (6cac46a).
Report is 5 commits behind head on staging.

Additional details and impacted files
@@           Coverage Diff            @@
##           staging     #890   +/-   ##
========================================
  Coverage    75.17%   75.17%           
========================================
  Files           55       55           
  Lines         1116     1116           
========================================
  Hits           839      839           
  Misses         277      277           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@lodewiges lodewiges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, I will not approve yet because we need to upgraded some deprecated things before moving to rails 7.1

@lodewiges lodewiges changed the title refactor: remove RAILS_MASTER_KEY from CI refactor: remove RAILS_MASTER_KEY from CI & upgrade to rails 7.1 Jan 1, 2025
@lodewiges lodewiges added this pull request to the merge queue Jan 9, 2025
Merged via the queue into staging with commit 1f7f4db Jan 9, 2025
5 checks passed
@lodewiges lodewiges deleted the refactor/no-ci-secrets branch January 9, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Wijzigingen in codebase zonder verandering van functionaliteit status:ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants