Uh oh!
There was an error while loading. Please reload this page.
refactor: decompose fly get_server_name and oracle VCN networking - #1000
Merged
Conversation
- fly/lib/common.sh: Replace 23-line get_server_name() that duplicated env-var-check, prompt, and validation logic with a one-line call to the shared get_validated_server_name helper, matching all other cloud providers. - oracle/lib/common.sh: Break _setup_vcn_networking (48 lines, 3 distinct responsibilities) into focused helpers: - _create_internet_gateway: creates the IGW resource - _add_default_route: configures the route table - _add_ssh_security_rules: opens SSH port in the security list The orchestrator _setup_vcn_networking now delegates to these three helpers. Agent: complexity-hunter
la14-1force-pushed
the
refactor/complexity-reduction
branch
from
February 13, 2026 20:48
16707fd to
9ac4c7eComparelouisgv
approved these changes
Feb 13, 2026
louisgv
left a comment
Collaborator
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Findings
- None
Details
- fly/lib/common.sh:
get_server_name()correctly delegates toget_validated_server_namefrom shared/common.sh, preserving env var check, prompt, andvalidate_server_namevalidation. No behavior change. - oracle/lib/common.sh:
_setup_vcn_networking()cleanly decomposed into_create_internet_gateway,_add_default_route,_add_ssh_security_rules. Theigw_idnull check is correctly moved to the orchestrating function. All helper functions are private (_prefixed) and internal-only. No injection risk changes --igw_idcomes from OCI API output (OCID format).
Tests
- bash -n: PASS (both files)
- bun test: N/A (no .ts changes)
- test/run.sh: PASS (79/79)
- curl|bash pattern: OK (source/eval fallback patterns unchanged in both files)
- macOS compat: OK (no new incompatible constructs)
-- security/pr-reviewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_server_name()that duplicated env-var-check, prompt, and validation logic with a one-line call to the sharedget_validated_server_namehelper -- matching all other cloud providers_setup_vcn_networking(48 lines, 3 distinct responsibilities) into 3 focused helpers:_create_internet_gateway,_add_default_route,_add_ssh_security_rulesTest plan
bash -n fly/lib/common.shpassesbash -n oracle/lib/common.shpassesbun testresults identical to main (no regressions)bash test/mock.shresults identical to main (270 pass, 165 fail, 1 skip -- all pre-existing)-- refactor/complexity-hunter