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

refactor(directives): git-overwrite -> git-clear #2643

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Oct 3, 2024

After dog feeding, it became apparent that the more natural way of this directive would be to clear a Git branch from contents before running e.g. kustomize-build.

By doing this, the previous ("rendered branch") flow of:

  1. Clone and checkout source and target
  2. Kustomize build to output/
  3. "Overwrite" output/ to target/

Changes to:

  1. Clone and checkout source and target
  2. Clear contents from target
  3. Kustomize build to target

Effectively causing there to be one directory less to deal with.

Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 0ebcbe1
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/66fee1d82b75560008329417
😎 Deploy Preview https://deploy-preview-2643--docs-kargo-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit 0ebcbe1
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/66fee1d8743fa20009be2cb0
😎 Deploy Preview https://deploy-preview-2643.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 38.88889% with 22 lines in your changes missing coverage. Please review.

Project coverage is 51.04%. Comparing base (0c8cd9b) to head (0ebcbe1).

Files with missing lines Patch % Lines
internal/directives/git_tree_clearer.go 38.88% 18 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2643      +/-   ##
==========================================
+ Coverage   51.02%   51.04%   +0.01%     
==========================================
  Files         282      282              
  Lines       21121    21092      -29     
==========================================
- Hits        10778    10766      -12     
+ Misses       9658     9644      -14     
+ Partials      685      682       -3     

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

@Marvin9
Copy link
Contributor

Marvin9 commented Oct 3, 2024

@hiddeco can you update the name here as well? On a side-note, do you have a better way to bundle built-in registries for accurate UI discovery mechanism?

@hiddeco hiddeco requested a review from a team as a code owner October 3, 2024 18:23
Copy link
Member

@krancour krancour left a comment

Choose a reason for hiding this comment

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

🔥 Agree this is a huge improvement. I will update my docs-in-progress accordingly.

@hiddeco
Copy link
Contributor Author

hiddeco commented Oct 3, 2024

On a side-note, do you have a better way to bundle built-in registries for accurate UI discovery mechanism?

Not completely sure I follow your question, but is your goal to e.g. gain access to the JSON schemas — or do you want to be able to discover any arbitrary directive that is available?

@Marvin9
Copy link
Contributor

Marvin9 commented Oct 3, 2024

On a side-note, do you have a better way to bundle built-in registries for accurate UI discovery mechanism?

Not completely sure I follow your question, but is your goal to e.g. gain access to the JSON schemas — or do you want to be able to discover any arbitrary directive that is available?

any directive that is available. Basically some mechanism, that prevents the necessity to update UI code for any modification in directive registry. I think we can tackle this later on when we make directives pluggable, for now hardcoding it in UI is fine

@krancour
Copy link
Member

krancour commented Oct 3, 2024

any directive that is available. Basically some mechanism, that prevents the necessity to update UI code for any modification in directive registry. I think we can tackle this later on when we make directives pluggable, for now hardcoding it in UI is fine

I put some thought into this the other night. I think it very likely that plugins will be registered using a plugin registration CRD. We'll make sure there is an API endpoint that can list those so the UI can learn everything it needs to about available directives.

For now, hard coded is fine.

@hiddeco hiddeco added this pull request to the merge queue Oct 3, 2024
Merged via the queue into akuity:main with commit 609a937 Oct 3, 2024
20 of 21 checks passed
@hiddeco hiddeco deleted the refactor-git-overwrite branch October 3, 2024 19:45
github-actions bot pushed a commit that referenced this pull request Oct 3, 2024
Signed-off-by: Hidde Beydals <[email protected]>
(cherry picked from commit 609a937)
@akuitybot
Copy link

Successfully created backport PR for release-0.9:

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.

4 participants