Skip to content

Investigate iD deploy using latest code #476

Closed

Description

@danrademacher

I tested deployment of the new iD, which is almost ready pending a few minor items, and it looks like we have an issue with how we're deploying.

We have a working iD based on upstream develop here: https://github.com/OpenHistoricalMap/id/tree/staging

I changed our target branch from release to staging here:
OpenHistoricalMap/ohm-website@58fcafc

That failed because dist doesn't have any build artifacts:

https://github.com/OpenHistoricalMap/ohm-deploy/actions/runs/3268885714/jobs/5375808680#step:7:4694

/var/lib/gems/2.7.0/gems/vendorer-0.2.0/lib/vendorer.rb:111:in `copy_from_path': 'dist/data' not found in https://github.com/openhistoricalmap/iD (RuntimeError)

At first I thought this was simply because I'd forgotten to run and commit outputs of npm run build, but that's not the case, since those outputs are all git-ignored:
https://github.com/OpenHistoricalMap/iD/blob/staging/.gitignore#L12-L20

that's an improvement, since tracking build artifacts has always been annoying, but if we look at upstream release branch, all those artifacts are still in git:
https://github.com/openstreetmap/iD/tree/release/dist

We have deployed iD updates in the past, but it's been a while... Clearly we're not following the OSM instructions at https://github.com/OpenHistoricalMap/iD/blob/staging/RELEASING.md#update-id

Will need to figure out the best path for us going forward.

Needed for #395

Activity

  1. danrademacher commented on Nov 2, 2022

    @danrademacher
    Author

    @tomay FYI once DevSeed sorts out #475, we're then going to re-encounter this issue, where it's all that clear how we can deploy our latest iD for testing.

    Come to think of it, this is something you could help sort out while we await the login fix -- because right now, we need to see whether we can deploy an iD branch other than release into the Rails app locally for testing. There must be a way, but I ran into troubles as noted in this ticket.

    When I looked upstream to how mainline iD is released, things got more complex, and really we're not even talking about a release here, but just the ability to test updates to iD inside the Rails application

  2. tomay commented on Nov 3, 2022

    @tomay

    It looks like the dist/ artifacts in the release branch were added in this commit. I'm not sure what the process for doing that was, but it is possible to add gitignored files to a commit with git add --force

  3. tomay commented on Nov 3, 2022

    @tomay

    I wonder if in the Vendorfile we could reference a local copy of the iD we are testing, where we have build artifacts, something like

    folder 'iD' do
        from '../ohm-id' do

    instead of

    folder 'iD' do
        from 'https://github.com/openhistoricalmap/iD', :branch => 'release' do

    not sure that's the right syntax, but the idea would be to reference the OHM iD repository one directory up on your local system, instead the remote one checked into GitHub

  4. 1ec5 commented on Nov 3, 2022

    @1ec5
    Member

    It looks like the dist/ artifacts in the release branch were added in this commit.

    This appears to be part of the release process. I was unaware of this step when suggesting that we upgrade to a release tag. Ideally we’d merge in that commit’s parent commit instead.

  5. danrademacher commented on Nov 23, 2022

    @danrademacher
    Author

    After upstream changes broke login function on our local dev environment, we have been struggling mightily to get that working again, as documented at OpenHistoricalMap/ohm-deploy#189. Meanwhile, impatient to get this iD update deployed, I went ahead and :

    Alas, it did not work.

    New iD is live at staging.openhistoricalmap.org, but the API calls for data are malformed with “undefined” in the middle https://staging.openhistoricalmap.org/undefined/api/0.6/map.json?bbox=-1.4941406249999953,52.92215137976296,-1.4886474609374956,52.92546307943839. When I run iD locally on its own, those same calls look like https://www.openhistoricalmap.org/api/0.6/map.json?bbox=-122.332763671875,47.59875528481802,-122.32727050781249,47.6024592954631 so somehow in the Rails app, something is broken and adding undefined/ to the API url…

    image

  6. added theissue type on Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions