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

fix: set oci.ImageOptions.Ref to the correct value to ensure plugin charts are installed #359

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

ahmad-ibra
Copy link
Contributor

@ahmad-ibra ahmad-ibra commented Aug 1, 2024

Description

In validatorctl, when configuring a custom private registry, pulling the plugin charts fails with this error:

2024-07-31 18:34:22 ERROR Plugin failed to install
                      └ validator-plugin-network: failed to pull chart: failed to fetch image from registry: GET https://toolbox.palette-adv.spectrocloud.com/v2/ahmad/charts/validator-plugin-network/validator-plugin-network/manifests/0.0.21: NOT_FOUND: repository ahmad/charts/validator-plugin-network/validator-plugin-network not found

As can be seen above, there is an extra /validator-plugin-network tacked on at the end.
This PR fixes that.

This PR is a pre-requisite to validator-labs/validatorctl#115

Test Notes

Tested this by:

  1. running helm install validator chart/validator/ -f chart/validator/values.yaml
  2. running ./bin/validator install and configuring a plugin using the default registry (quay)
  3. running ./bin/validator install and configuring a plugin using a custom private registry (harbor)

Everything runs correctly with this change. Prior to this change, test 3 was failing.

@ahmad-ibra ahmad-ibra changed the title fix: set imageOpts ref to the correct value to ensure plugin charts c… fix: set oci.ImageOptions.Ref to the correct value to ensure plugin charts are installed Aug 1, 2024
@ahmad-ibra ahmad-ibra marked this pull request as ready for review August 1, 2024 02:07
@ahmad-ibra ahmad-ibra requested a review from a team as a code owner August 1, 2024 02:07
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 1, 2024
TylerGillson
TylerGillson previously approved these changes Aug 1, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 1, 2024
@ahmad-ibra ahmad-ibra dismissed TylerGillson’s stale review August 1, 2024 02:19

The merge-base changed after approval.

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files Patch % Lines
internal/controller/validatorconfig_controller.go 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #359      +/-   ##
==========================================
+ Coverage   48.56%   55.35%   +6.79%     
==========================================
  Files          22       21       -1     
  Lines        1287     1102     -185     
==========================================
- Hits          625      610      -15     
+ Misses        594      425     -169     
+ Partials       68       67       -1     
Files Coverage Δ
internal/controller/validatorconfig_controller.go 68.55% <0.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5aaf2c4...37ceb3f. Read the comment docs.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. size:S This PR changes 10-29 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. size:M This PR changes 30-99 lines, ignoring generated files. labels Aug 1, 2024
@ahmad-ibra ahmad-ibra force-pushed the fix/oci-imageOpts-ref branch 2 times, most recently from b882c27 to e602df3 Compare August 1, 2024 02:46
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. size:S This PR changes 10-29 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 1, 2024
TylerGillson
TylerGillson previously approved these changes Aug 1, 2024
@ahmad-ibra ahmad-ibra merged commit e698d13 into main Aug 1, 2024
7 checks passed
@ahmad-ibra ahmad-ibra deleted the fix/oci-imageOpts-ref branch August 1, 2024 18:47
ahmad-ibra added a commit that referenced this pull request Aug 1, 2024
…harts are installed (#359)

## Description
In validatorctl, when configuring a custom private registry, pulling the
plugin charts fails with this error:
```
2024-07-31 18:34:22 ERROR Plugin failed to install
                      └ validator-plugin-network: failed to pull chart: failed to fetch image from registry: GET https://toolbox.palette-adv.spectrocloud.com/v2/ahmad/charts/validator-plugin-network/validator-plugin-network/manifests/0.0.21: NOT_FOUND: repository ahmad/charts/validator-plugin-network/validator-plugin-network not found
```

As can be seen above, there is an extra `/validator-plugin-network`
tacked on at the end.
This PR fixes that.

This PR is a pre-requisite to
validator-labs/validatorctl#115

## Test Notes
Tested this by:
1. running `helm install validator chart/validator/ -f
chart/validator/values.yaml`
2. running `./bin/validator install` and configuring a plugin using the
default registry (quay)
3. running `./bin/validator install` and configuring a plugin using a
custom private registry (harbor)

Everything runs correctly with this change. Prior to this change, test 3
was failing.
This was referenced Aug 1, 2024
ahmad-ibra added a commit that referenced this pull request Aug 1, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.0](v0.0.50...v0.1.0)
(2024-08-01)


### ⚠ BREAKING CHANGES

* create root level HelmConfig struct which applies to all HelmReleases
([#356](#356))

### Features

* create root level HelmConfig struct which applies to all HelmReleases
([#356](#356))
([6fe04ba](6fe04ba))


### Bug Fixes

* set oci.ImageOptions.Ref to the correct value to ensure plugin charts
are installed
([#359](#359))
([effd172](effd172))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Ahmad Malik Ibrahim <ahmad.ibrahim@spectrocloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants