@Timothy Leavitt and others: I know this isn't Jenkins support, but I seem to be having trouble allowing the account running Jenkins to get into IRIS. Just trying to get this to work locally at the moment.  I'm running on Windows through an organizational account, so I created a new local account on the computer, jenkinsUser, which I'm to understand is the 'user' that logs in and runs everything on Jenkins.  When I launch IRIS in the build script using . . .

C:\MyPath\bin\irisdb -s C:\MyPath\mgr -U MYNAMESPACE  0<inFile

 . . . I can see in the console it's trying to login.  I turned on O/S authentication for the system and allowed the %System.Login function to use Kerbose.  I can launch Terminal from my tray and I'm logged in without a user/password prompt.  

I am guessing that IRIS doesn't know about my jenkinsUser local account, so it won't allow that user to us O/S authentication?  I'm trying to piece this together in my head.  How can I allow this computer user trying to run Jenkins access to IRIS without authentication?  

Hope this helps others who are trying to set this up.

Thanks, @Timothy Leavitt!

For others working through this too, I wanted to sum some points up that I discussed with Tim over PM.

- Tim reiterated the usefulness of the Test Coverage tool and the Cobertura output for finding starting places based on complexity and what are the right blocks to test.

- When it comes to testing persistent data classes, it is indeed tricky but valuable (e.g. data validation steps).  Using transactions (TSTART and TROLLBACK) is a good approach for this.

I also discussed the video from some years ago on the mocking framework.  It's an awesome approach, but for me, it depends on retooling classes to fit the framework.  I'm not in a place where I want to or can rewrite classes for the sake of testing, however this might be a good approach for others.  There may be other open source frameworks for mocking available later. 

Hope this helps and encourages more conversation!  In a perfect world we'd start with our tests and code from there, but well, the world isn't perfect!

I'm helping maintain a fairly old code base that wasn't built around test-driven development.  I know debugging and testing are two different things, but I often find that the only way to test my code is to use the debugger.  If I had better ways of stepping and out of entry points to automate these tests it would be great, but the debugger doesn't work like that. 

Does anyone else find that their unit testing is also using the debugger?  

I have followed these steps both from the GitHub readme file and this more detailed article and I'm having an issue.

To start, however, know I was able to follow the instructions on the the DockerHub page for IRIS and I got my container running and VS Code connected and working.  Since I got that working, I decided to better understand starting with this template.

I downloaded the objectscript-docker-template from GitHub to my local drive K:\objectscript-docker-template.  I ran the commands to install and run the IRIS container in Git Bash and I see it running in Docker Desktop. I can go in the container's command line and type 'iris TERMINAL IRIS' and I'm brought to the USER namespace.

Back in the project location, I run 'docker-compose up -d' and I get a series of errors:

$ docker-compose up -d
Creating objectscript-docker-template_iris_1 ... error

ERROR: for objectscript-docker-template_iris_1  Cannot create container for service iris: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled","StackTrace":"   at Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__6.MoveNext() in C:\\workspaces\\stable-2.3.x\\src . . .

It goes on and on so I won't paste the whole thing.

If I stop the Docker container it's also deleted.  

Has anyone had a similar issue or can see right off the bat what I might be doing wrong?

Thanks,

Mike

I see below that you've asked Raj to get a webinar going, so I will look forward to that!

I think I'm just getting bogged down in terms.  You said that server-side dev is the only option IRIS provides, but so far what I've experienced is that I can edit a .CLS or .MAC file in my local workspace and then on save it's sent to the server (the container running IRIS) and compiled. 

Now that I've saved that file and it's on the server, to continue making changes I should open up the server-side file and continue editing from there?  Or I can continue working on the local and it will overwrite the sever side?

I think I'm seeing your point about commits then.  I edit it locally, it's sent to the server, the server sends it to the repo, and locally I should pull down the repo before continuing any changes. Is that the idea?

The development lifecycle and source control at my work doesn't utilize modern source control (git) and it's my first programming job (no context elsewhere), so it takes me a while to grasp some of these things :)

Well, maybe I don't quite understand MAC files.  I tried again this morning and helloWorld.mac kept erroring with an illegal header.  I added 'ROUTINE helloWorld' the top.  Still didn't work.  Added helloWorld.inc and now the MAC file has compiled.  I thought the MAC file compiles down to the INT file.  I'm not even sure what the INC file is. 

I am also having a odd time with connections.  My Docker stats show this:

Ports
1972/tcp localhost:9091
52773/tcp localhost:9092
 
and my setting are as such:
 
"objectscript.conn": {
            "ns""TEST",
            "server""docker-my-iris",
        "active"true
    }
 
"intersystems.servers": {
 
        "docker-my-iris": {
            "webServer": {
                "scheme""http",
                "host""localhost",
                "port"9092
            },
        }
    },
 
For some reason it connects me to the USER namespace even though I've indicated TEST.
 
Happy to email or use the DM feature to take this off the boards if it's too messy to help with here :)

Yes, a webinar!

I'm not following the concept of starting with the project and using VS Code to compile/test.  Where would you do your local development then?  Isn't that why we use VS Code?

Reading the documentation, I'm also confused if local development is even desirable?  In my case I have IRIS community running docker and I have Cache 2018 running on my local machine (can't get IRIS locally as it's a work computer and locked down).  In this case I probably just want to develop all my code on the server?

I guess where I'm a little confused is this: is the code for Sergey's demo a docker image?  The little code mix graph on GitHub says it's mostly TypeScript.  So it's just Javascript code for the most part?  What is the 'docker-compse up' command doing to that bundle of code from the git repo while it sits in my web app in IRIS?

So am I to understand that for this demo to work, I would need to run a containerized IRIS using docker, not a local instance on my machine?

Ugh, chicken and egg here . . . I think I need to know more about Docker and IRIS before I even attempt this.

@Ben Spead Thanks for taking a stab at it. 

Ok yes, good, it makes sense that is the default behavior.

I think really the only other pressing question is if this tutorial should run on Cache, not just IRIS.   I thought I had Docker installed on my machine, but I think I must be lacking an AD group or something to actually run it.

That said, Docker is new territory for me too: I just read the 'docker-compose up' command documentation and I'm a bit confused.  When you run a Docker image, isn't there a virtual machine at play?  How is Docker working in this context where I've unloaded the code from GitHub to my webapp and then running the docker-compose up command in that directory?  

Thanks for any help.

Mike

@Sergei.Shutov 

Hi there!  I started following this tutoiral and got stuck pretty fast.  Some questions you might be able to help with:

- Should I be able to do this in Cache 2018?  We are not yet on IRIS.

- If so, was it correct to clone the app into my CSP application root (e.g. for me it was C:\InterSystems\Cache\CSP\mxdtest\new-project)?  I did this becuase for example I have C:\InterSystems\Cache\CSP\mxdtest\testpage.html and it renders as expected when I visit http://localhost:57772/CSP/mxdtest/test/testpage.html (I know you can't use these links, but I'm just trying to show you the best I can what I'm doing).

- General web application question for Cache/IRIS: once I create the web application for example at \csp\mxdtest, any subfolder there is treated as part of the app, yes?  So i could create C:\InterSystems\Cache\CSP\mxdtest\images and the images folder are part of the web applcation  \csp\mxdtest?

Questions maybe you can advise on but might be something for my system admin to answer:

- When I run npm run -- ng build --watch I get this:

$ npm run -- ng build --watch

> angular-ngrx-material-starter@8.3.0 ng C:\InterSystems\Cache\CSP\mxdtest\new-project
> ng "build" "--watch"

Browserslist: caniuse-lite is outdated. Please run next command `npm update`

Date: 2020-09-04T16:33:26.206Z
Hash: aa7f367b55f24e0e97d8
Time: 15768ms
chunk {main} main.js, main.js.map (main) 675 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 159 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.27 MB [initial] [rendered]

ERROR in projects/angular-ngrx-material-starter/src/app/app/app.component.ts(35,10): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
projects/angular-ngrx-material-starter/src/app/features/about/about/about.component.ts(13,19): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
projects/angular-ngrx-material-starter/src/app/features/examples/theming/parent/parent.component.ts(12,22): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
projects/angular-ngrx-material-starter/src/environments/environment.prod.ts(1,21): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
projects/angular-ngrx-material-starter/src/environments/environment.test.ts(1,21): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
projects/angular-ngrx-material-starter/src/environments/environment.ts(6,21): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.

Then when I run the docker command it says docker isn't running, though I seem to have it installed.

Your thoughts are appreciated!

Mike