Skip to content

Warn when CI env variables are overwritten#254

Merged
Pacyfik merged 1 commit intomasterfrom
overwritten-ci-env
May 23, 2024
Merged

Warn when CI env variables are overwritten#254
Pacyfik merged 1 commit intomasterfrom
overwritten-ci-env

Conversation

@Pacyfik
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread lib/knapsack_pro/config/env.rb Outdated
Comment thread lib/knapsack_pro/config/env.rb Outdated
Comment thread lib/knapsack_pro/config/env.rb Outdated
Comment thread lib/knapsack_pro/config/env.rb Outdated
Comment thread lib/knapsack_pro/config/env.rb Outdated
@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
Copy Markdown
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! 🎉

Comment thread spec/knapsack_pro/config/env_spec.rb
@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
@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