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

All files in stream file deployment path blindly set to CCSID 1208 after deploy #2126

Closed
sbdev003 opened this issue Jun 19, 2024 · 3 comments
Labels
discussion For questions, or when something isn't working as expected

Comments

@sbdev003
Copy link

Type: Bug

This appears to be related to Set CCSID of deployed files to 1208 if needed #2015 (feature/fixDeployCCSID).

The issue can be reproduced with the following steps:

  1. Create files with CCSID other than 1208 in deployment directory (e.g., 819):
819 -rw-r--r--  1 ME 0                   1 Jun 18 12:24 /home/ME/builds/test/file1
819 -rw-r--r--  1 ME  0                  1 Jun 18 12:49 /home/ME/builds/test/file2
819 -rw-r--r--  1 ME  0                  1 Jun 18 12:49 /home/ME/builds/test/file3
  1. Deploy file2 and see the following message in deployment output:
Created deployment tarball /tmp/tmp-7096-3LkxcLCrIbvS-.tar
Uploaded deployment tarball as /tmp/deploy_O_guATC5DM.tar
1 file(s) uploaded to /home/ME/builds/test/file2
Deployed files' CCSID set to 1208
  1. See that all files in deployment directory have been set to CCSID 1208.
1208 -rw-r--r--  1 ME  0                  1 Jun 18 12:24 /home/ME/builds/test/file1
1208 -rw-r--r--  1 ME  0                  1 Jun 18 12:49 /home/ME/builds/test/file2
1208 -rw-r--r--  1 ME  0                  1 Jun 18 12:49 /home/ME/builds/test/file3

IBM i system: V7R5M0
Shell on target system: bash 5.2

Code for IBM i test to trigger behavior (on my target system):

-bash-5.2$ touch codeforiccsidtest && attr codeforiccsidtest CCSID && rm codeforiccsidtest
819

Expected behavior:

  • Deployment should have no impact on files not involved in the deployment
  • Deployment should retain CCSID for pre-existing files in deployment.
  • Deployment resulting in new file(s) in target system should get CCSID set by environment
  • Auto-correcting of CCSID should be configurable and optional

Extension version: 2.11.0
VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:01:24.262Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

@worksofliam worksofliam added the discussion For questions, or when something isn't working as expected label Jun 19, 2024
@worksofliam
Copy link
Contributor

The reason I've tagged this as discussion and not bug is because it seems like you might be using the feature in an unintended way.

Deployment should retain CCSID for pre-existing files in deployment.

In theory, the 'pre-existing' files you have there should be from previously deployed files - not anything else. The deployment process as part of Code for IBM i has the ability to blast files away when it deems necessary based on your deployment method chosen.

Second, as your issue with 1208 (UTF8). Most likely all files on your local device are stored as unicode (either UTF8 or UTF16), and therefore, when we deploy files to the server, we want to ensure the sources uploaded are the same as what they are from where they came.

It sounds like to me that this issue should really be a feature request for the following item:

Auto-correcting of CCSID should be configurable and optional

@sbdev003
Copy link
Author

sbdev003 commented Jun 19, 2024

Yes, there are some aspects of my scenario that are probably outside of the intended use case. This is a large cross-platform multi-component project. I just recently discovered Code for IBM i and am trying to retrofit it into the workflow. I was using it with great success a few months ago and then moved to another platform for a while. Upon returning to IBM i, I found the recent change was causing considerable issues for me.

I absolutely love the Code for IBM i extension and dread the thought of developing without it.

A feature request for:

Auto-correcting of CCSID should be configurable and optional

would certainly resolve my issue but, it does seem that the current behavior could be going a bit overboard. I believe it is changing the CCSIC for all files in all subdirectories as well. There could be generated content there that required varied CCSIDs and would not be expected to be regenerated on each deployment.

@worksofliam
Copy link
Contributor

@sbdev003 I am going to close this and I recommend you create a new issue with the request to turn on/off the CCSID manipulation. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion For questions, or when something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants