Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

Web service not fetching latest data

alexandrtolstoy's Avatar

alexandrtolstoy

Jan 20, 2016 @ 02:58 PM

Hi,

I have a question / issue.

I updated my database schema to include a new column, and adding values to a few rows in that column.

When I run my web service code locally, I am able to see the values in the new column for the rows that I added values to.
However, on AppHarbor, the column shows up, but the values for that column are NULL.

Any thoughts on why this could be happening? Does the AppHarbor service have DB results cached in a way that I need to be aware of?

Thanks,

Andrew

  1. Support Staff 1 Posted by rune on Jan 20, 2016 @ 10:39 PM

    rune's Avatar

    Hi Andrew,

    I'm not sure what would cause this type of issue, particularly if other values are written to the database (i.e. if it's not an issue connecting to the database in the first place). A few suggestions:

    • Are you sure the code that writes to values to the new column has been committed to your repository? If you're using git you might want to verify that the code has been committed by running git diff or git diff --cached (if the code has been staged but not committed).
    • Are you using Entity Framework or similar? Another customer recently had an issue where the EF files were not updating during the build causing the models and the database schema to be out of sync. Or the application is using files/binaries build locally that aren't being copied to the output directory as expected).
    • Some binaries files in your local repository may be different from the files uploaded to AppHarbor. For instance, dlls in your bin folder are usually ignored by .git, so if the application rely on changes in those files they won't be available when AppHarbor is building the application. You may want to clean your local git repository to test that -- executing git clean -fdx will remove all files not currently tracked by git, and would help isolate issues related to this type of difference between the local and AppHarbor environments. Be aware though that this will delete any changes not committed to your repository, so you may want to backup the folder prior to making this change.

    If this doesn't help let me know and I'll be happy to take a closer look at your repository and code.

    Best,
    Rune

  2. 2 Posted by alexandrtolstoy on Jan 22, 2016 @ 03:57 AM

    alexandrtolstoy's Avatar

    Hi Rune,

    I've eliminated the first possible cause, as all of the code is definitely checked in.

    I am using the Entity Framework, and maybe the problem is there but not sure what it could be. Because the new column is appearing in the JSON web service results, but the value is simply null, it's leading me to believe that the code is updated but maybe there is caching somewhere on AppHarbor.

    But I'm also open to your thoughts or suggestions on how to figure this out.

    I will definitely need your assistance with a closer look.

    Thanks,

    Andrew

  3. 3 Posted by alexandrtolstoy on Jan 25, 2016 @ 02:27 AM

    alexandrtolstoy's Avatar

    Hi Rune,

    Just wanted to circle back and say I just resolved the issue.

    After using a .gitignore file to not check in files in bin or obj directory, the issue seemed to resolve itself.

    Thanks,

    Andrew

  4. alexandrtolstoy closed this discussion on Jan 25, 2016 @ 02:27 AM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac