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 #4274 Add or delete challenge phase/phase splits #4392

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Harshit28j
Copy link

@Harshit28j Harshit28j commented Jul 3, 2024

This PR resolves #4274

I debug each and every functionality and statements to find out the root cause of this problem and I figured out that issue is from the challenge_phase_split_uuids (which actually holds data value from yaml)

I removed the loop that tell us about the combination in which we have error and added a condition to append the combination if it does not exist in current_phase_split_id (which is from host)

This is how the workflow looks like for validate_challenge_phase_splits

image

Its somewhat similarly for validate_challenge_phase

@Harshit28j
Copy link
Author

Harshit28j commented Jul 3, 2024

Here is the working:-

  • Adding challenge phase and phase split
  • Deleting challenge phase and phase split
Challenge.Phase.Split.mp4

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.27%. Comparing base (96968d6) to head (dcb9f0d).
Report is 1110 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4392      +/-   ##
==========================================
- Coverage   72.93%   69.27%   -3.66%     
==========================================
  Files          83       20      -63     
  Lines        5368     3574    -1794     
==========================================
- Hits         3915     2476    -1439     
+ Misses       1453     1098     -355     

see 64 files with indirect coverage changes

see 64 files 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 be3c597...dcb9f0d. Read the comment docs.

@gautamjajoo
Copy link
Member

@Harshit28j We should remove (1,2,2) instead of appending. Thoughts?

@Harshit28j
Copy link
Author

Harshit28j commented Jul 6, 2024

@Harshit28j We should remove (1,2,2) instead of appending. Thoughts?

Yes, @gautamjajoo I agree. Also, since I removed the for loop that uses challenge_phase_split_uuids to respond to the user about missing UUIDs, I think there is no longer a need for the challenge_phase_split_uuids variable either.

Edit: I tested in my local code environment and it's working. Instead of removing missing combinations, I removed combinations that already exist, considering this case:

Let's say we have new combinations from the yaml file (1,2,3) and current_challenge_phase_split are from host
(1,1,1), (1,2,1), (1,2,2). Then if a combination does not exist, it will show a ValueError.

So I only removed combinations that already exist, and it's working fine. I have tried and tested it by both adding and deleting.

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.

Add ability to add or delete challenge phase and splits
3 participants