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

Set CCSID of deployed files to 1208 if needed #2015

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

sebjulliand
Copy link
Collaborator

@sebjulliand sebjulliand commented Apr 26, 2024

Changes

Resolves #1995

On systems <= 7.3, the deployed files are created with a CCSID 819 (or at least different from 1208).
This PR checks (once per connection, during the first deployment - the check result is cached) if the CCSID needs to be set to 1208 after a successful deployment and runs the setccsid command if needed.

How to test this PR

Here is a query to list files with CCSID != 1208:

select path_name, ccsid
from table(qsys2.ifs_object_statistics( 
           start_path_name => '/deployment/path',
           subtree_directories => 'yes'))
where ccsid != 1208

This should be tested on two systems:

  • On a system where stream files are created with CCSID 819 (IBM i OS <= 7.3)
  1. Deploy the local workspace
  2. Check the progress says Fixing files CCSID...
  3. If running an action, check the following log appear in the task log: Deployed files' CCSID set to 1208
  4. The SQL query above should not return any result
  • On a system where stream files are created with CCSID 1208
  1. Deploy the local workspace
  2. Nothing should be logged about fixing the CCSID
  3. The SQL query above should not return any result

Checklist

  • have tested my change

@sebjulliand sebjulliand added the enhancement New feature or request label Apr 26, 2024
@sebjulliand sebjulliand self-assigned this Apr 26, 2024
@worksofliam worksofliam self-assigned this Apr 26, 2024
@worksofliam worksofliam added this to the 2.11.0 milestone Apr 29, 2024
@edmundreinhardt
Copy link
Collaborator

I have tested and this works!

@edmundreinhardt
Copy link
Collaborator

Is there a reason why this is targetting 2.11 instead of 2.10?

@worksofliam
Copy link
Contributor

@edmundreinhardt 2.10.0 is basically finalized and we only need to do doc changes now.

@edmundreinhardt
Copy link
Collaborator

Just a shame because this is important to supporting IFS deployment. We were hitting this quite a bit on our test IBM i machines. For Code for i to support local development on 7.3 for example, this is critical. It is a small PR and should hopefully not be a big risk.

@worksofliam
Copy link
Contributor

@edmundreinhardt I am going to test it today 😄

@worksofliam
Copy link
Contributor

Tested on three systems and it works as expected. Good work @sebjulliand!

@sebjulliand sebjulliand merged commit 5d6b849 into master Apr 30, 2024
1 check passed
@sebjulliand sebjulliand deleted the feature/fixDeployCCSID branch April 30, 2024 15:05
@sebjulliand sebjulliand modified the milestones: 2.11.0, 2.10.0 Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Guarantee UTF8 encode for source that is deployed, even if to V7R3
3 participants