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
MGMT-16262: Part1 of implementing usage of custom OCP releases #5916
MGMT-16262: Part1 of implementing usage of custom OCP releases #5916
Conversation
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Skipping CI for Draft Pull Request. |
a4825d5
to
7e18cc4
Compare
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
7e18cc4
to
eede94c
Compare
/test all |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5916 +/- ##
==========================================
+ Coverage 68.25% 68.39% +0.13%
==========================================
Files 236 239 +3
Lines 35053 35453 +400
==========================================
+ Hits 23927 24248 +321
- Misses 9049 9100 +51
- Partials 2077 2105 +28
|
eede94c
to
d34e2f5
Compare
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/test all |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@danmanor: This pull request references MGMT-16262 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/cc @rccrdpccl |
c8b350e
to
73ad714
Compare
// enrichedReleaseImage is a struct designed to aggregate release images and enrich them by adding release channels | ||
type enrichedReleaseImage struct { | ||
models.ReleaseImage | ||
channel *string |
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.
I don't think this needs to be a pointer and I think we should create an OpenshiftReleaseChannel
enum instead of using string and constants.
cmd/main.go
Outdated
if err != nil { | ||
log.WithError(err).Debug("error occurred while creating release sources handler") | ||
} | ||
releaseSourcesHandler.SyncReleaseImagesThreadFunc() |
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.
I think make the non-thread version of this public and use it here to properly report if it fails.
err := h.validateReleaseSources() | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = h.validateStaticReleaseImages() | ||
if err != nil { | ||
return err | ||
} |
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.
Can we do these validations on initialization?
I don't see a reason to do them every run and then we could also save the static enriched images as a part of the handler state and not run getStaticReleaseImages
every loop also.
if release.SupportLevel != "" { | ||
continue | ||
} |
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.
This will need to be removed if we persist enrichedReleaseImages for static.
Currently this will always we empty for static release images, but if we save them it will always have the value from the previous loop. To deal with this we can just always set the level to the new one for this loop.
58a7a7b
to
48b07c5
Compare
48b07c5
to
f54a618
Compare
/hold |
/test edge-subsystem-aws /test e2e-agent-compact-ipv4 |
/test edge-subsystem-aws |
/unhold |
…penShift API and updates DB
f54a618
to
d516839
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, danmanor The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@danmanor: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
ec0d30d
into
openshift:master
[ART PR BUILD NOTIFIER] This PR has been included in build ose-agent-installer-api-server-container-v4.16.0-202402261639.p0.gec0d30d.assembly.stream.el8 for distgit ose-agent-installer-api-server. |
…s from OpenShift API and updates DB (openshift#5916)" This reverts commit ec0d30d.
…CP releases from OpenShift API and updates DB (openshift#5916)" This reverts commit ec0d30d.
In General
This PR is part 1 of the Implementation of this enhancement proposal - https://github.com/openshift/assisted-service/blob/master/docs/enhancements/dynamic-fetching-of-openshift-versions.md, which is enabling usage of dynamic
openshift
releases.Main flow
This part is about creating a periodic utility that updates current
OCP
releases inpostgresql
DB, for later use of assisted service -The main changes are:
RELEASE_SOURCES
which specifies whichOCP
releases we want to keep in the DB and support (new table calledrelease_images
) as well as from which channel, what CPU architectures, etc. Then it starts a new go routine that runs periodically.OCP
versions support levels from another API.Plan forward (part 2)
This part is about retrieving the new list of supported openshift versions in endpoint
/api/assisted-install/v2/openshift-versions
, and enabling their installation.The main changes are:
only_latest
,version_pattern
) that will be used by theUI
to present short list of the versions. We also filter by a new configuration parameterIGNORED_RELEASE_IMAGES
, which contains a list of versions we don't want to retrieve (as one might have a blocker bug).Remarks
assisted-service/docs/enhancements/dynamic-fetching-of-openshift-versions.md
Line 145 in e604bc4
/api/assisted-install/v2/release-sources
ENABLE_OPENSHIFT_RELEASE_SYNCER
. This is because this new feature does not have much meaning in kubeAPI deployments as then openshift release images are managed through a resource calledClusterIMageSet
, also specified in the enhancement -assisted-service/docs/enhancements/dynamic-fetching-of-openshift-versions.md
Line 71 in ee0a350
cpu_architectures
for each release image in the DB for simplicity sake, as it can be derived fromcpu_architecture
, and it requires using SQL arraysassisted-service/docs/enhancements/dynamic-fetching-of-openshift-versions.md
Line 237 in f5fc195
RELEASE_IMAGES
in order to enable unsupported release images. It is merged into the API release images during fetching process in order to have one source of truth.List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs
, README, etc)Reviewers Checklist