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

Warn when CI env variables are overwritten #254

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

Pacyfik
Copy link
Contributor

@Pacyfik Pacyfik commented May 20, 2024

Story

https://trello.com/c/VMKgyjFP/365-warn-when-overriding-envs-in-supported-ci-ruby-js

Related

TODO: links to related PRs or issues

Description

Log when KNAPSACK_PRO_* environment variables are set manually if their values could be automatically determined from supported CI environments, and both values are different.

Changes

Uses logger.info to display a message when both the KNAPSACK_PRO_* and CI envs are present and different from each other.
Test_logging_overwritten_ci_envs_·_Pacyfik_reedsy-challenge-backend_323a487

Checklist reminder

  • You follow the architecture outlined below for RSpec in Queue Mode, which is a work in progress (feel free to propose changes):
    • Pure: lib/knapsack_pro/pure/queue/rspec_pure.rb contains pure functions that are unit tested.
    • Extension: lib/knapsack_pro/extensions/rspec_extension.rb encapsulates calls to RSpec internals and is integration and e2e tested.
    • Runner: lib/knapsack_pro/runners/queue/rspec_runner.rb invokes the pure code and the extension to produce side effects, which are integration and e2e tested.

@Pacyfik Pacyfik self-assigned this May 20, 2024
Copy link
Contributor

@3v0k4 3v0k4 left a comment

Choose a reason for hiding this comment

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

Nice and tidy. Good job!

Leaving it to you to decide if you want a second round or just address the comments and release.

lib/knapsack_pro/config/env.rb Outdated Show resolved Hide resolved
lib/knapsack_pro/config/env.rb Outdated Show resolved Hide resolved
lib/knapsack_pro/config/env.rb Outdated Show resolved Hide resolved
lib/knapsack_pro/config/env.rb Outdated Show resolved Hide resolved
lib/knapsack_pro/config/env.rb Outdated Show resolved Hide resolved
@Pacyfik Pacyfik force-pushed the overwritten-ci-env branch 3 times, most recently from 4e28ee4 to e44c0fc Compare May 22, 2024 15:18
Copy link
Contributor

@3v0k4 3v0k4 left a comment

Choose a reason for hiding this comment

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

Yeah! 🎉

spec/knapsack_pro/config/env_spec.rb Show resolved Hide resolved
@Pacyfik Pacyfik force-pushed the overwritten-ci-env branch from e44c0fc to 52194a8 Compare May 23, 2024 14:26
@Pacyfik Pacyfik merged commit b59e4b7 into master May 23, 2024
45 checks passed
@Pacyfik Pacyfik deleted the overwritten-ci-env branch May 23, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants