-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Geodesic v4 #961
base: main
Are you sure you want to change the base?
Geodesic v4 #961
Changes from all commits
0da2146
3dae18b
85a32de
9f454e7
a39ac0e
c55309e
60f537a
5d771d8
2c7f7c5
b2d1b45
94e2add
d9b0786
4cdafb3
fd9e32f
12e6954
ca10994
6167248
6e637c2
9e3715b
adbff8e
0dffaba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
language: en-US | ||
tone_instructions: '' | ||
early_access: true | ||
enable_free_tier: true | ||
reviews: | ||
profile: chill | ||
request_changes_workflow: false | ||
high_level_summary: true | ||
high_level_summary_placeholder: '@coderabbitai summary' | ||
high_level_summary_in_walkthrough: false | ||
auto_title_placeholder: '@coderabbitai' | ||
auto_title_instructions: '' | ||
review_status: true | ||
commit_status: true | ||
fail_commit_status: false | ||
collapse_walkthrough: true | ||
changed_files_summary: true | ||
sequence_diagrams: false | ||
assess_linked_issues: true | ||
related_issues: true | ||
related_prs: true | ||
suggested_labels: false | ||
auto_apply_labels: false | ||
suggested_reviewers: false | ||
poem: false | ||
labeling_instructions: [] | ||
path_filters: [] | ||
path_instructions: [] | ||
abort_on_close: true | ||
auto_review: | ||
enabled: true | ||
auto_incremental_review: true | ||
ignore_title_keywords: [] | ||
labels: [] | ||
drafts: false | ||
base_branches: [] | ||
finishing_touches: | ||
docstrings: | ||
enabled: true | ||
tools: | ||
shellcheck: | ||
enabled: true | ||
ruff: # for Python | ||
enabled: false | ||
markdownlint: | ||
enabled: true | ||
github-checks: | ||
enabled: true | ||
timeout_ms: 90000 | ||
languagetool: | ||
enabled: true | ||
enabled_only: false | ||
level: default | ||
biome: # For JavaScript/TypeScript | ||
enabled: false | ||
hadolint: | ||
enabled: true | ||
swiftlint: # For Swift | ||
enabled: false | ||
phpstan: # For PHP | ||
enabled: false | ||
level: default | ||
golangci-lint: # For Go | ||
enabled: false | ||
yamllint: | ||
enabled: true | ||
gitleaks: | ||
enabled: true | ||
checkov: | ||
enabled: true | ||
detekt: # For Kotlin | ||
enabled: false | ||
eslint: # For JavaScript/TypeScript | ||
enabled: false | ||
rubocop: # For Ruby | ||
enabled: false | ||
buf: # For Protobuf | ||
enabled: false | ||
regal: # For Rego | ||
enabled: false | ||
actionlint: | ||
enabled: true | ||
pmd: # For Java | ||
enabled: false | ||
cppcheck: # For C/C++ | ||
enabled: false | ||
semgrep: # Static analysis. CodeRabbit recommends disabling this tool unless you configure specific rules for it. | ||
enabled: false | ||
circleci: # For CircleCI | ||
enabled: false | ||
chat: | ||
auto_reply: true | ||
integrations: | ||
jira: | ||
usage: disabled | ||
linear: | ||
usage: disabled | ||
knowledge_base: | ||
opt_out: false | ||
learnings: | ||
scope: auto | ||
issues: | ||
scope: auto | ||
jira: | ||
usage: disabled | ||
project_keys: [] | ||
linear: | ||
usage: disabled | ||
team_keys: [] | ||
pull_requests: | ||
scope: auto |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -83,8 +83,10 @@ jobs: | |||||||||||||
TAGS="$TAGS,${{ env.ECR_REGISTRY }}${{ github.repository }}:latest-${BASE_OS}" | ||||||||||||||
LATEST_TAGS="$TAGS,${{ github.repository }}:latest" | ||||||||||||||
LATEST_TAGS="$LATEST_TAGS,${{ env.ECR_REGISTRY }}${{ github.repository }}:latest" | ||||||||||||||
echo is_production=yes >> $GITHUB_OUTPUT | ||||||||||||||
else | ||||||||||||||
LATEST_TAGS="$TAGS" | ||||||||||||||
echo is_production=no >> $GITHUB_OUTPUT | ||||||||||||||
fi | ||||||||||||||
printf "Tagging %s with " "${BASE_OS}" | ||||||||||||||
if [[ "${BASE_OS}" == "$LATEST_TAG_OS" ]]; then | ||||||||||||||
|
@@ -124,8 +126,8 @@ jobs: | |||||||||||||
type=semver,pattern={{version}} | ||||||||||||||
type=ref,event=pr,prefix=pr-,suffix=-${{matrix.os}} | ||||||||||||||
type=sha,prefix=sha-,suffix=-${{matrix.os}} | ||||||||||||||
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' }} | ||||||||||||||
type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && matrix.os == env.LATEST_TAG_OS }} | ||||||||||||||
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }} | ||||||||||||||
type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' && matrix.os == env.LATEST_TAG_OS }} | ||||||||||||||
Comment on lines
+129
to
+130
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Consider simplifying the latest tag conditions. The conditions for enabling latest tags are complex and repeated. Consider extracting the condition to a composite expression. + # Define condition for latest tag
+ IS_LATEST_CANDIDATE: ${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
- type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
- type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' && matrix.os == env.LATEST_TAG_OS }}
+ type=raw,value=latest,enable=${{ env.IS_LATEST_CANDIDATE }}
+ type=raw,value=latest,suffix=,enable=${{ env.IS_LATEST_CANDIDATE && matrix.os == env.LATEST_TAG_OS }} 📝 Committable suggestion
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That doesn't work There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Nuru, understood. Could you clarify what specifically isn’t working about the environment variable approach? If you can share any error messages or logs, that might help pinpoint the issue and figure out a better alternative. Otherwise, we can leave the existing logic in place. Let me know how you’d like to proceed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are attempting to set an environment variable in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Nuru, indeed, GitHub Actions doesn't allow setting an environment variable in - name: Prepare environment
id: prepare-env
run: |
if [[ <condition> ]]; then
echo "IS_LATEST_CANDIDATE=true" >> $GITHUB_OUTPUT
else
echo "IS_LATEST_CANDIDATE=false" >> $GITHUB_OUTPUT
fi
- name: Docker metadata
uses: docker/metadata-action@v5
with:
# ...
tags: |
# reference outputs from the previous step
type=raw,value=latest,enable=${{ steps.prepare-env.outputs.IS_LATEST_CANDIDATE == 'true' }}
type=raw,value=latest,suffix=,enable=${{ steps.prepare-env.outputs.IS_LATEST_CANDIDATE == 'true' && matrix.os == env.LATEST_TAG_OS }} This way, you can reuse the condition across subsequent steps without having to rely on environment variables that do not get expanded in the |
||||||||||||||
|
||||||||||||||
- name: Show metadata | ||||||||||||||
run: | | ||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,7 +17,7 @@ | |||||
# We always recommend pinning versions where changes are likely to break things. | ||||||
# We put the versions up top here so they are easy to find and update. | ||||||
# Find the latest version at https://github.com/cloudposse/geodesic/releases | ||||||
ARG VERSION=2.11.0 | ||||||
ARG VERSION=4.0.0 | ||||||
# Changing base OS for Geodesic is possible by changing this arg, but | ||||||
# unfortunately, the package managers are different, so it is not that simple. | ||||||
ARG OS=debian | ||||||
|
@@ -45,30 +45,18 @@ ENV AWS_REGION_ABBREVIATION_TYPE=fixed | |||||
ENV AWS_DEFAULT_REGION=us-west-2 | ||||||
ENV AWS_DEFAULT_SHORT_REGION=uw2 | ||||||
|
||||||
# Install specific versions of Terraform. | ||||||
# We patch specific patch versions because Terraform will not operate | ||||||
# on Terraform "states" that have been touched by later versions. | ||||||
ARG TF_014_VERSION=0.14.10 | ||||||
ARG TF_015_VERSION=0.15.4 | ||||||
ARG TF_1_VERSION=1.0.4 | ||||||
RUN apt-get update && apt-get install -y -u \ | ||||||
terraform-0.14="${TF_014_VERSION}-*" terraform-0.15="${TF_015_VERSION}-*" \ | ||||||
terraform-1="${TF_1_VERSION}-*" | ||||||
# Set Terraform 0.14.x as the default `terraform`. You can still use | ||||||
# version 0.15.x by calling `terraform-0.15` or version 1.x as terraform-1 | ||||||
RUN update-alternatives --set terraform /usr/share/terraform/0.14/bin/terraform | ||||||
|
||||||
# Pin kubectl minor version (must be within 1 minor version of cluster version) | ||||||
# Note, however, that due to Docker layer caching and the structure of this | ||||||
# particular Dockerfile, the patch version will not automatically update | ||||||
# until you change the minor version or change the base Geodesic version. | ||||||
# If you want, you can pin the patch level so you can update it when desired. | ||||||
ARG KUBECTL_VERSION=1.20 | ||||||
ARG KUBECTL_VERSION=1.30 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix kubectl version - current version appears incorrect The specified kubectl version 1.30 is not valid as the latest stable version is 1.28. Apply this diff to fix the version: -ARG KUBECTL_VERSION=1.30
+ARG KUBECTL_VERSION=1.28 📝 Committable suggestion
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, 1.31 is the current stable version, and 1.32.0 is out There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Nuru Thank you for clarifying. Understood that you want to keep using a more recent version (1.31 or 1.32). Since you’ve decided against reverting to 1.28, we’ll leave things as-is or update to one of those newer versions as you prefer. (┬┬﹏┬┬) |
||||||
RUN apt-get update && apt-get install kubectl-${KUBECTL_VERSION} | ||||||
Nuru marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
# Install Atmos CLI (https://github.com/cloudposse/atmos) | ||||||
RUN apt-get install atmos | ||||||
Nuru marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
COPY rootfs/ / | ||||||
|
||||||
WORKDIR / | ||||||
WORKDIR /workspace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using a stricter review profile for major version releases.
The "chill" profile might be too lenient for a major version release (v4). Consider using a stricter profile to ensure thorough code review.
📝 Committable suggestion