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

RSE-873: Scheduled forecast GUI errors #8998

Merged
merged 6 commits into from Mar 14, 2024

Conversation

avelasquezr
Copy link
Contributor

@avelasquezr avelasquezr commented Mar 12, 2024

Is this a bugfix, or an enhancement? Please describe.
This PR addresses a bug related to the Schedule Forecast page.

Describe the problem
When selecting more than two projects (but not all) on the Schedule Forecast page and clicking the "search" button, the loading icon remains stuck, and a warning icon appears. This issue stems from the API call to http://rundeck/api/v/{params.project}/executions/running where params.project is not correctly processed for multiple selected projects.

Describe the solution you've implemented
The solution involves two main changes:

  1. Interceptor Exclusion: Modify the ApiProjectSelectInterceptor to include an exclusion for the apiExecutionsRunningv14() method, allowing it to bypass pre-validation checks that incorrectly handle multiple projects.
  2. API Method Enhancement: The apiExecutionsRunningv14() method will be updated to:
    • Split the params.project string by commas to process each project individually.
    • Validate each project to ensure it exists, is active, and has read authorization.
    • Return appropriate error responses for invalid projects.

Describe alternatives you've considered
An alternative approach was to refactor the interceptor validations. However, this would have required significant changes across various API calls and potentially introduced new bugs. The chosen solution minimizes the impact on other components and focuses on addressing the specific issue.

References

  • Related issue: fixes #RSE-873

@avelasquezr avelasquezr added this to the 5.2.0 milestone Mar 12, 2024
@avelasquezr avelasquezr force-pushed the RSE-873-scheduled-forecast-gui-errors branch 2 times, most recently from 72badad to 664d668 Compare March 12, 2024 22:34
@avelasquezr avelasquezr force-pushed the RSE-873-scheduled-forecast-gui-errors branch from 23b2426 to 799ee5a Compare March 13, 2024 17:08
1) change disableScheduledAndDeleteProject method to receive params
2) change api version to the last version.
3) the original test is added in the where and if it matches with false.
Additional: Add groovy docs
Update ProjectUtils.groovy
@avelasquezr avelasquezr force-pushed the RSE-873-scheduled-forecast-gui-errors branch from 9ff71be to bcc68a2 Compare March 13, 2024 17:38
Refactor code.
Separate in two method to update configuration project and delete project
@avelasquezr avelasquezr force-pushed the RSE-873-scheduled-forecast-gui-errors branch from 3561319 to a5af02e Compare March 13, 2024 18:47
@avelasquezr avelasquezr force-pushed the RSE-873-scheduled-forecast-gui-errors branch from 93b4fb5 to 411654e Compare March 13, 2024 19:34
Copy link
Contributor

@ronaveva ronaveva left a comment

Choose a reason for hiding this comment

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

LGTM

@avelasquezr avelasquezr merged commit 263efee into main Mar 14, 2024
4 checks passed
@avelasquezr avelasquezr deleted the RSE-873-scheduled-forecast-gui-errors branch March 14, 2024 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants