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

TC_AUTHOR_45 > Studio > Unit > Some advance X blocks are giving error in studio #159

Closed
fayyazahmed66 opened this issue Apr 27, 2022 · 19 comments
Assignees
Labels
bug Report of or fix for something that isn't working as intended
Milestone

Comments

@fayyazahmed66
Copy link

Steps to reproduce:

  1. Go to https://studio.nutmeg.demo.overhang.io/home with staff credentials
  2. Go to any course and add these units a) Custom JavaScript Display and Grading b) Custom Python-Evaluated Input. c) Problem with Adaptive Hint
  3. Check errors

Expected result:
All x blocks should be added successfully
Actual result:
Getting errors on mentioned x blocks

Image:
Screenshot at Apr 27 12-27-12

@fayyazahmed66
Copy link
Author

fayyazahmed66 commented Apr 27, 2022

"label:nutmeg testing"

@DeanJayMathew
Copy link

label: nutmeg testing

@DeanJayMathew
Copy link

label: affects:nutmeg

@DeanJayMathew
Copy link

label: type:bug

@github-actions github-actions bot added the bug Report of or fix for something that isn't working as intended label Apr 27, 2022
@mariajgrimaldi
Copy link
Member

Hi, I think some of those issues have something to do with the tutor codejail plugin, which doesn't have support for Nutmeg yet. We (eduNEXT) are working on it!

@BbrSofiane BbrSofiane added this to the Nutmeg Release milestone May 14, 2022
@BbrSofiane
Copy link
Member

Hi @mariajgrimaldi, is there someone we can assign this to? I guess the task would be to:

  1. report here when the plugin is ready so it can be installed on the demo instance and then
  2. Test that the issue is fixed

@BbrSofiane
Copy link
Member

@mariajgrimaldi
Copy link
Member

PR for nutmeg-demo support: overhangio/openedx-release-demo#15

@mariajgrimaldi
Copy link
Member

Hello there, @regisb, hope you're well. When can we deploy the new changes to nutmeg-demo so we can test if this works?

@regisb
Copy link
Contributor

regisb commented Jun 3, 2022

The codejail plugin was deployed on Monday as part of the latest run: https://github.com/overhangio/nutmeg-demo/runs/6660828918?check_suite_focus=true

@mariajgrimaldi
Copy link
Member

I'll be testing this then! Thank you so much @regisb

@mariajgrimaldi
Copy link
Member

mariajgrimaldi commented Jun 3, 2022

Hello there! I've just tested this and got these results:

image
image
image

I think we're getting this error:

Problem with Adaptive Hint
cannot create LoncapaProblem block-v1:edX+DemoX+Demo_Course+type@problem+block@b77fe2dc33644e2491c526ae413de497: Error while executing script code: Couldn't execute jailed code: stdout: b'', stderr: b'Traceback (most recent call last):\n File "jailed_code", line 19, in <module>\n exec(code, g_dict)\n File "<string>", line 67\n print expect, ans\n ^\nSyntaxError: Missing parentheses in call to \'print\'. Did you mean print(expect, ans)?\n' with status code: 1. For more information check Codejail Service logs.

Might be because of the problem template:
https://github.com/openedx/edx-platform/blob/master/common/lib/xmodule/xmodule/templates/problem/problem_with_hint.yaml

Should we update the template?

@regisb
Copy link
Contributor

regisb commented Jun 6, 2022

Should we update the template?

We most probably should :)

@angonz
Copy link

angonz commented Jun 6, 2022

Hi all,
Is the codejail plugin working in K8s? I've been testing and couldn't make it work. There's been an incipient discussion and I've been investigating the daemonset option as recommended in the K8s docs without success yet.

@mariajgrimaldi
Copy link
Member

mariajgrimaldi commented Jun 6, 2022

Then I'm on it @regisb.

Hello there @angonz! Can you open an issue in the codejail plugin repo (so the info it's documented there)? I'll tag the team that maintains our k8s installations so they can help you out

@MoisesGSalas
Copy link

Hi @angonz, would mind telling which part is not working for you? (the service as a whole or the profile enforcement?).

Applying the apparmor profile onto the nodes of a managed Kubernetes service is a challenge we are currently facing and we don't have a good solution at the moment.

P.S. You can test the service without specifying the apparmor profile by deleting the container.apparmor.security.beta.kubernetes.io/codejailservice: "localhost/docker-edx-sandbox" annotation.

@angonz
Copy link

angonz commented Jun 6, 2022

Thanks @mariajgrimaldi and @MoisesGSalas!! Yes, it's the profile setting at the node the problem. Let's follow up in the plugin repo: eduNEXT/codejailservice#15

@mariajgrimaldi
Copy link
Member

PR fixing template in the nutmeg release: openedx/edx-platform#30570

@mariajgrimaldi
Copy link
Member

I believe we can close this issue after this PR is reviewed and merged: overhangio/tutor#698

@regisb regisb closed this as completed Jun 27, 2022
github-actions bot added a commit to openedx/edx-platform that referenced this issue Jun 28, 2022
…r versions

<!--

🌰🌰
🌰🌰🌰🌰         🌰 Note: the Nutmeg master branch has been created.  Please consider whether your change
    🌰🌰🌰🌰     should also be applied to Nutmeg. If so, make another pull request against the
🌰🌰🌰🌰         open-release/nutmeg.master branch, or ping @nedbat for help or questions.
🌰🌰

Please give your pull request a short but descriptive title.
Use conventional commits to separate and summarize commits logically:
https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html

Use this template as a guide. Omit sections that don't apply. You may link to information rather than copy it.
More details about the template are at openedx/open-edx-proposals#180
(link will be updated when that document merges)
-->

## Description

This PR updates the problem with hint template so it works with Python3+. It simply adds parenthesis to a print statement that was causing an error while rendering this kind of problem.

## Supporting information

- This bug was reported on [this](openedx/wg-build-test-release#159 (comment)) BTR issue.
- [Master PR](#30585)

## Testing instructions

(tested on tutor Nutmeg version)
1. Install the codejail plugin following [these](https://github.com/eduNEXT/tutor-contrib-codejail) instructions
2. Create a problem with hint unit, it shouldn't throw any errors (like the one reported)

## Deadline

None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Development

No branches or pull requests

7 participants