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

Docker config for local dev environment doesn't properly set up XSpec #1743

Closed
aj-stein-nist opened this issue Apr 7, 2023 · 0 comments · Fixed by #1744
Closed

Docker config for local dev environment doesn't properly set up XSpec #1743

aj-stein-nist opened this issue Apr 7, 2023 · 0 comments · Fixed by #1744
Assignees
Labels
bug Developer Experience Issues around enhancing and optimizing work for development of NIST OSCAL artifacts Scope: CI/CD Enhancements to the project's Continuous Integration and Continuous Delivery pipeline.
Milestone

Comments

@aj-stein-nist
Copy link
Contributor

Describe the bug

When using the local Docker environment based on the build/Dockerfile and build/docker-compose.yml specs, XSpec unit testing framework is installed, but recent updates to the dependency tree for Saxon 11.x and beyond require the classpath to be more precisely configured for the XSpec wrapper script to execute correctly. If not, all attempts to use XSpec on the CLI will fail.

Who is the bug affecting

NIST and community OSCAL developers, specifically those working on evaluating current state of tests as part of spike work to plan next steps for #1735.

What is affected by this bug

CI/CD

How do we replicate this issue

  1. Checkout out the develop branch.
  2. Go to the build directory with pushd build
  3. Build the container and init a docker compose environment: docker compose up -d
  4. Exec into the container docker compose exec cli /bin/bash
  5. Run any XSpec test and observe a similar stack trace:
root@5a871d563df2:/oscal/src/specifications/profile-resolution# /oscal/build/metaschema/support/xspec/bin/xspec.sh example-set.xspec                                            
Creating Test Stylesheet...
Type error at char 5 in expression in xsl:sequence/@select on line 33 column 45 of uri-utils.xsl:
  XPTY0004  An empty sequence is not allowed as the first argument of x:resolve-xml-uri-with-catalog()
at function x:document-actual-uri on line 26 column 60 of uri-utils.xsl:
     invoked by function call at file:/oscal/build/metaschema/support/xspec/src/compiler/base/resolve-import/gather/gather-specs.xsl#36
  In template rule with match="element(Q{http://www.jenitennison.com/xslt/xspec}description)" on line 32 of gather-specs.xsl
     invoked by xsl:apply-templates at file:/oscal/build/metaschema/support/xspec/src/compiler/base/resolve-import/resolve-import.xsl#21
at function x:resolve-import on line 13 column 55 of resolve-import.xsl:
     invoked by unknown caller (class net.sf.saxon.value.MemoClosure)
at function x:resolve-import on line 13 column 55 of resolve-import.xsl:
     invoked by function call at file:/oscal/build/metaschema/support/xspec/src/compiler/base/main.xsl#86
  In template rule with match="/" on line 82 of main.xsl
An empty sequence is not allowed as the first argument of x:resolve-xml-uri-with-catalog()

*** Error compiling the test suit

Expected behavior (i.e. solution)

The tests run with the correct Saxon XSLT processor configuration with a preconfigured classpath.

Other comments

No response

@aj-stein-nist aj-stein-nist added bug Scope: CI/CD Enhancements to the project's Continuous Integration and Continuous Delivery pipeline. Developer Experience Issues around enhancing and optimizing work for development of NIST OSCAL artifacts labels Apr 7, 2023
@aj-stein-nist aj-stein-nist self-assigned this Apr 7, 2023
@aj-stein-nist aj-stein-nist moved this from Todo to In Progress in NIST OSCAL Work Board Apr 7, 2023
@aj-stein-nist aj-stein-nist linked a pull request Apr 7, 2023 that will close this issue
6 tasks
@aj-stein-nist aj-stein-nist moved this from In Progress to Under Review in NIST OSCAL Work Board Apr 7, 2023
aj-stein-nist added a commit that referenced this issue Apr 7, 2023
* Specify classpath for Saxon under XSpec for #1743.

* Update path to include xspec.sh for #1743 per Nikita's feedback.
@aj-stein-nist aj-stein-nist moved this from Under Review to Done in NIST OSCAL Work Board Apr 7, 2023
aj-stein-nist added a commit to aj-stein-nist/OSCAL-forked that referenced this issue Jun 29, 2023
…v#1744)

* Specify classpath for Saxon under XSpec for usnistgov#1743.

* Update path to include xspec.sh for usnistgov#1743 per Nikita's feedback.
aj-stein-nist added a commit to aj-stein-nist/OSCAL-forked that referenced this issue Jul 10, 2023
…v#1744)

* Specify classpath for Saxon under XSpec for usnistgov#1743.

* Update path to include xspec.sh for usnistgov#1743 per Nikita's feedback.
@aj-stein-nist aj-stein-nist added this to the v1.1.0 milestone Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Developer Experience Issues around enhancing and optimizing work for development of NIST OSCAL artifacts Scope: CI/CD Enhancements to the project's Continuous Integration and Continuous Delivery pipeline.
Projects
Status: Done
1 participant