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

👻 Update check for running analysis / cancel analysis #1885

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

ibolton336
Copy link
Member

@ibolton336 ibolton336 commented Apr 25, 2024

This PR narrows down the check for analysis tasks that are cancellable. Also the logic is updated and flipped for "disabling" the creation of a new analysis task. Analysis tasks should be creatable when there are no states for tasks outside of "succeeded" or "failed". This will future proof against any other additional task states that may be added in the future. The "scheduled" state was just added for 0.4 & is the motivation behind this PR ( as requested by @jortel )

@ibolton336 ibolton336 changed the title 👻 Add check for scheduled when checking if analysis button enabled 👻 Update check for running analysis / cancel analysis Apr 25, 2024
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

The change looks ok with the regex, just a suggestion about how it could be done differently.

Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.22%. Comparing base (b654645) to head (30ad160).
Report is 171 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1885      +/-   ##
==========================================
+ Coverage   39.20%   42.22%   +3.01%     
==========================================
  Files         146      170      +24     
  Lines        4857     5450     +593     
  Branches     1164     1363     +199     
==========================================
+ Hits         1904     2301     +397     
- Misses       2939     3133     +194     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.22% <ø> (+3.01%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@sjd78 sjd78 added this to the v0.5.0 milestone May 8, 2024
@ibolton336 ibolton336 requested a review from sjd78 May 14, 2024 13:29
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

The checks read a bunch better now with the .includes() in place of the regex.

@sjd78
Copy link
Member

sjd78 commented May 22, 2024

  • Update this logic to account for new states added to task engine on backend API side

Is this PR dependent on a hub PR getting merged? If yes, please reference the PR or hub issue in the PR description.

@ibolton336
Copy link
Member Author

Is this PR dependent on a hub PR getting merged? If yes, please reference the PR or hub issue in the PR description.

Description updated with more context! Could not find a specific hub PR for this. @sjd78

@ibolton336 ibolton336 marked this pull request as draft June 12, 2024 14:15
@rszwajko
Copy link
Collaborator

@ibolton336
integration tests fail because they cannot delete an application

  AssertionError: Timed out retrying after 8000ms: expected '<button#analyze-application.pf-v5-c-button.pf-m-primary.pf-m-disabled>' to be 'enabled'
      at Analysis.startAnalysis (cypress/e2e/models/migration/applicationinventory/analysis.ts:199:43)
      (...)

No elements in the current DOM matched your query:

  > cy.get(span.pf-v5-c-menu__item-text).contains(Delete)
(...)
  From Your Spec Code:
      at clickItemInKebabMenu (cypress/utils/utils.ts:657:57)
      at Application.delete (cypress/e2e/models/migration/applicationinventory/application.ts:254:29)
     

@ibolton336 ibolton336 marked this pull request as ready for review June 20, 2024 19:31
@sjd78 sjd78 merged commit 349911b into konveyor:main Jun 20, 2024
12 checks passed
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.

3 participants