-
Notifications
You must be signed in to change notification settings - Fork 35
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
✨ Support AI Service #630
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/major
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Comments
konveyor-ci-bot
bot
added
the
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
label
Apr 26, 2024
This issue is currently awaiting triage. |
konveyor-ci-bot
bot
added
needs-kind
Indicates an issue or PR lacks a `kind/foo` label and requires one.
needs-priority
Indicates an issue or PR lacks a `priority/foo` label and requires one.
labels
Apr 26, 2024
Merged
jortel
added
kind/feature
Categorizes issue or PR as related to a new feature.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
priority/major
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
needs-kind
Indicates an issue or PR lacks a `kind/foo` label and requires one.
needs-priority
Indicates an issue or PR lacks a `priority/foo` label and requires one.
labels
Jun 6, 2024
jortel
added a commit
that referenced
this issue
Jun 11, 2024
closes #630 - Added endpoint: - GET /applications/:id/analyses/issues - GET /analyses - GET /analyses/:id/issues - Updated api.Analysis to omit issues, summary. Struct never used this way. - Add field: Analysis.Commit. migration=13. Added IssueWriter to support new endpoints. --- migration/14 ``` diff -bur migration/v13/model/analysis.go migration/v14/model/analysis.go --- migration/v13/model/analysis.go 2024-06-11 03:29:34.402853992 -0700 +++ migration/v14/model/analysis.go 2024-06-11 04:29:29.898613621 -0700 @@ -6,7 +6,8 @@ type Analysis struct { Model Effort int - Archived bool `json:"archived"` + Commit string + Archived bool Summary JSON `gorm:"type:json"` Issues []Issue `gorm:"constraint:OnDelete:CASCADE"` Dependencies []TechDependency `gorm:"constraint:OnDelete:CASCADE"` diff -bur migration/v13/model/application.go migration/v14/model/application.go --- migration/v13/model/application.go 2024-06-11 03:29:34.402853992 -0700 +++ migration/v14/model/application.go 2024-06-11 04:29:29.898613621 -0700 @@ -76,7 +76,7 @@ return } -// Validation Hook to avoid cyclic dependencies. +// BeforeCreate detects cyclic dependencies. func (r *Dependency) BeforeCreate(db *gorm.DB) (err error) { var nextDeps []*Dependency var nextAppsIDs []uint @@ -96,11 +96,11 @@ return } -// Custom error type to allow API recognize Cyclic Dependency error and assign proper status code. +// DependencyCyclicError reports cyclic Dependency error. type DependencyCyclicError struct{} -func (err DependencyCyclicError) Error() string { - return "cyclic dependencies are not allowed" +func (e DependencyCyclicError) Error() string { + return "Cyclic dependencies are not permitted." } type BusinessService struct { ``` --------- Signed-off-by: Jeff Ortel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/major
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
The AI Service needs
To synchronize analysis reports. This requires:
Solution
Fetch Analysis Reports
Add
/analyses
endpoint with filtering onid
. Consistent with/applications/analyses
returns a sparse report (empty issues). As a policy, the hub cannot hold an Analysis report in memory because each report can be very large. The is to prevent multiple/concurrent API requests from exceeding 2G memory limit. For this reason, endpoints cannot return arrays or large resources either.Example: assumes URL encoding
A stretch goal would be to add a kubernetes (like) watch mechanism (like we did in MTV).
Perhaps:
For each resource returned, fetch the complete report using:
/analyses/:id
.Retention Policy
Add a setting to define the analysis report retention policy. This will determine when an analysis report may be archived. Thinking the policy should be expressed as the number of un-archived reports for each application (beyond the latest). Values:
A new endpoint will need to be added to archive a report (after synchronized by KAI).
Perhaps: POST /analyses/:id/archive
Commit (hash)
Add a field to the
Analysis
resource. In an effort to support both Git and Subversion, the filed would be named:commit
. For git this would be a hash.The addon-analyzer will need to set this field.
The text was updated successfully, but these errors were encountered: