Skip to content

Conversation

worksofliam
Copy link
Member

Changes

Enhance the ability to configure and fetch the active ASP, ensuring that the application can correctly utilize the configured ASP in various operations. Add test cases to validate the expected behavior of these changes.

How to test this PR

Examples:

  1. Run the test cases
  2. Use a system with at least one iASP configured
  3. Edit the iASP / database configuration option in the connection settings

Checklist

  • have tested my change
  • have created one or more test cases
  • updated relevant documentation
  • Remove any/all console.logs I added
  • have added myself to the contributors' list in CONTRIBUTING.md

@worksofliam worksofliam had a problem deploying to testing_environment May 1, 2025 20:11 — with GitHub Actions Failure
Copy link
Contributor

github-actions bot commented May 1, 2025

👋 A new build is available for this PR based on bd46718.

@worksofliam worksofliam had a problem deploying to testing_environment May 1, 2025 20:17 — with GitHub Actions Failure
@worksofliam worksofliam had a problem deploying to testing_environment May 2, 2025 12:59 — with GitHub Actions Failure
@worksofliam worksofliam had a problem deploying to testing_environment May 2, 2025 13:47 — with GitHub Actions Failure
@worksofliam
Copy link
Member Author

@sebjulliand @chrjorgensen I believe you both have access to system with multiple ASPs. I did test with common1, but if you wouldn't mind giving this a go I would appreciate it.

@sebjulliand
Copy link
Member

Sure! I wanted to try it today but had no time. I'll give it a spin tomorrow.
In the meantime @worksofliam , can you resolve the conflicts?

@worksofliam worksofliam had a problem deploying to testing_environment May 5, 2025 17:37 — with GitHub Actions Failure
@worksofliam
Copy link
Member Author

@sebjulliand Done!!

@worksofliam worksofliam added this to the 2.16.0 milestone May 7, 2025
Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

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

Tested these changes on a system with one ASP and didn't notice any issues. Test cases are all passing.

@SanjulaGanepola
Copy link
Member

Tested these changes on a system with one ASP and didn't notice any issues. Test cases are all passing.

Sooo right as I say that, I find something 😅

Libraries on an ASP can be found in the Object Browser, but we can't add them to the library list. Is the logic you have here applicable outside of just CompileTools? In sendCommand itself?

image

@worksofliam
Copy link
Member Author

@SanjulaGanepola For sure that's a problem! We will have to change our logic in the library list browser to take the ASP into account. I will take a look. We should write some test cases too. Good spot!

@worksofliam
Copy link
Member Author

worksofliam commented May 7, 2025

Here is a list of APIs that need to be checked over:

  • runCommand
  • content.getLibraryList
    • This should work.
    • Need to write a test case with and without an IASP configured
  • content.validateLibraryList
    • this is using qsh's liblist to check each library, which is not taking the configured IASP into account.
    • Either we change this API to use runCommand with CHGLIBL under the hood, or we swap out to use the new liblist bash built in after running SETASPGRP - either way will require bash, so we'll need a fallback if bash is not available (like runCommand)
    • Thinking about this, we might need to run the latter idea (liblist) since this API depends on the output from liblist

@worksofliam worksofliam self-assigned this May 7, 2025
@worksofliam
Copy link
Member Author

@SanjulaGanepola and I have discovered an additional problem. cl does not work with CODECOV at all. We need a way to fallback to using system through an additional option for our API.

@worksofliam worksofliam had a problem deploying to testing_environment May 15, 2025 13:22 — with GitHub Actions Failure
@worksofliam worksofliam had a problem deploying to testing_environment May 15, 2025 13:54 — with GitHub Actions Failure
Copy link
Contributor

👋 A new build is available for this PR based on b046014.

@worksofliam
Copy link
Member Author

@SanjulaGanepola I have added a new environment type which will use the original functionality. The testing extension will have to use that for CODECOV.

Please review whenever you can. @sebjulliand you too if you like!

@SanjulaGanepola
Copy link
Member

Steps to re-create:

  1. Add library on ASP to library
  2. Create source member in that library.
  3. Run an action.

Looks like the problem is that runAction will use system and won't set the ASP:

/home/SANJULA: LC_ALL=EN_US.UTF-8 /home/SANJULA/.vscode/cqsh_1
liblist -d TESTTOOLS QGPL QTEMP && liblist -c SANJULA1 && liblist -a ONASP1 QDEVTOOLS SANJULA2 RPGUNIT QTEMP TESTTOOLS && system "CRTBNDRPG PGM(ONASP1/TEST2) SRCFILE(ONASP1/QSRC) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)"
{
    "code": 1,
    "signal": null,
    "stdout": "",
    "stderr": "liblist: 001-0081 Error CPF2110 found adding library ONASP1 to library list."
}

image

Signed-off-by: worksofliam <[email protected]>
@worksofliam worksofliam had a problem deploying to testing_environment May 15, 2025 18:20 — with GitHub Actions Failure
@worksofliam worksofliam had a problem deploying to testing_environment May 15, 2025 18:23 — with GitHub Actions Failure
Signed-off-by: worksofliam <[email protected]>
Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

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

Works as expected now. Nice!

Test extension also working. Had to update these commands to specifically use system: CODECOV, CPYFRMSTMF, RSTLIB

@worksofliam worksofliam had a problem deploying to testing_environment May 21, 2025 14:37 — with GitHub Actions Failure
@worksofliam worksofliam marked this pull request as draft May 21, 2025 14:38
@worksofliam
Copy link
Member Author

@SanjulaGanepola @sebjulliand I have converted back to draft for now. I am waiting to hear from Korinne about whether we need cqsh any further due to usage of cl since they can't be used together (well they can, but we don't want that).

@sebjulliand sebjulliand modified the milestones: 2.16.0, 3.0.0 Jun 6, 2025
@worksofliam
Copy link
Member Author

I heard from the IBM OpenSSH team and they have made a fix, but it won't be available until late July. They will supply the PTF numbers, and then we get back to this PR.

@worksofliam
Copy link
Member Author

This PR will need to support both cqsh and cl for those customers who do not update to the new PTFs right away:

image

@worksofliam worksofliam added the stale Inactive label Aug 12, 2025
@worksofliam worksofliam linked an issue Aug 12, 2025 that may be closed by this pull request
@worksofliam worksofliam mentioned this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement cbsh Failing to Set ASP Device - Cannot Open Source Members
3 participants