You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by "Starch, Michael D (388L)" <Mi...@jpl.nasa.gov> on 2013/01/29 21:13:42 UTC

Re: Patch For Env Vars

Cris et. all,

I have attached a patch for OODT-553 to fix the EnvUtilities to call System.getEnvironment instead of run env.  I have some suspicions that the latter (exec env) is causing problems on my project, and this patch updates it to use the native java mechanisms which work as of java 1.5, or 1.6.  This should be more stable and portable.

The test case needs to run on UNIX to get access to USER and HOME environment variables to work, so I make that check first.

See below for previous discussion.

-Michael Starch (starch)


On Jan 17, 2013, at 9:37 PM, Mattmann, Chris A (388J) wrote:

Hi Mike,

From: <Starch>, "Michael D (388L)" <Mi...@jpl.nasa.gov>>
Date: Thursday, January 17, 2013 12:05 PM
To: jpluser <ch...@jpl.nasa.gov>>
Subject: Patch For Env Vars

Chris,

Here is the patch for the Env Vars (svn diff from trunk level).  Let me know if it is accepted by OODT, and if I need to send it somewhere else (Not sure where to send it for review).

Thank you! You should:

  1.  File a JIRA issue in Apache OODT — https://issues.apache.org/jira/browse/OODT
  2.  Attach this patch to the issue
  3.  Request someone on the dev@oodt list (by replying to the thread) to review the patch and commit it

I added some unit tests, the fix to use System.getenv and noticed that the EnvUtilities.java is in win/dos format not unix.  I did not change the format, just a heads up.

Awesome if you have time file a patch for fixing the line format too (and a separate issue as you pointed out).

The tests make the assumption that that USER and HOME variables are defined.  If this is a bad assumption, a new avenue of testing would need to be investigated.

How about if those env vars aren't defined based on OS, then don't run them (e.g., you could do a test for OS and if it's e.g., windoze, then don't run them or something?)

BTW this and the above can and should be discussed on list. This is for 2 benefits:

  1.  Others can benefit from our convo in the Apache community
  2.  You earn the merit you deserve by having others see what great and cool things you are doing via your discussion

Thanks Mike and see you on list! Appreciate your contribution.

Cheers,
Chris


-Michael




Re: Patch For Env Vars

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
Thanks Mike, thanks for creating the Review Board too!

I went ahead and commented back check it out.

Thanks again.

Cheers,
Chris

From: <Starch>, "Michael D (388L)" <Mi...@jpl.nasa.gov>>
Date: Tuesday, January 29, 2013 12:13 PM
To: jpluser <ch...@jpl.nasa.gov>>
Cc: "dev@oodt.apache.org<ma...@oodt.apache.org>" <de...@oodt.apache.org>>
Subject: Re: Patch For Env Vars

Cris et. all,

I have attached a patch for OODT-553 to fix the EnvUtilities to call System.getEnvironment instead of run env.  I have some suspicions that the latter (exec env) is causing problems on my project, and this patch updates it to use the native java mechanisms which work as of java 1.5, or 1.6.  This should be more stable and portable.

The test case needs to run on UNIX to get access to USER and HOME environment variables to work, so I make that check first.

See below for previous discussion.

-Michael Starch (starch)


On Jan 17, 2013, at 9:37 PM, Mattmann, Chris A (388J) wrote:

Hi Mike,

From: <Starch>, "Michael D (388L)" <Mi...@jpl.nasa.gov>>
Date: Thursday, January 17, 2013 12:05 PM
To: jpluser <ch...@jpl.nasa.gov>>
Subject: Patch For Env Vars

Chris,

Here is the patch for the Env Vars (svn diff from trunk level).  Let me know if it is accepted by OODT, and if I need to send it somewhere else (Not sure where to send it for review).

Thank you! You should:

  1.  File a JIRA issue in Apache OODT — https://issues.apache.org/jira/browse/OODT
  2.  Attach this patch to the issue
  3.  Request someone on the dev@oodt list (by replying to the thread) to review the patch and commit it

I added some unit tests, the fix to use System.getenv and noticed that the EnvUtilities.java is in win/dos format not unix.  I did not change the format, just a heads up.

Awesome if you have time file a patch for fixing the line format too (and a separate issue as you pointed out).

The tests make the assumption that that USER and HOME variables are defined.  If this is a bad assumption, a new avenue of testing would need to be investigated.

How about if those env vars aren't defined based on OS, then don't run them (e.g., you could do a test for OS and if it's e.g., windoze, then don't run them or something?)

BTW this and the above can and should be discussed on list. This is for 2 benefits:

  1.  Others can benefit from our convo in the Apache community
  2.  You earn the merit you deserve by having others see what great and cool things you are doing via your discussion

Thanks Mike and see you on list! Appreciate your contribution.

Cheers,
Chris


-Michael