Duplicate reporting module in modulus

@elliott, unfortunately it looks like this feature isn’t available in the version of modulus deployed to production.

(At least I can’t find this and this when I look around the production tag.)

Who would be the one to deploy the latest modulus code into production? (And/or can someone say why this hasn’t happened yet, or can’t?)

@darius, It’s deployed from Bamboo.

@r0bby, I assume there’s more than that, i.e. someone would need to move the “production” tag in git, but I don’t know who owns this.

@elliott, another question, do you know offhand if I can access the REST api directly via postman? And if so, what the url would be?

@darius, aren’t you in the Owners group on github, and therefore have access to all repos to do this? We should however test it in staging (you can deploy to staging from Bamboo as well I believe?)

I have the privileges to change a tag in github, but I have zero insight into why the tags are set the way they are, and why the master branch isn’t yet deployed to production. So, I don’t want to touch anything unless any of these happen:

  • @elliott tells us what the current state is and why
  • someone else who has this info speaks up (or @elliott tells us who else that would be)
  • we realize that literally nobody owns this, and nobody knows the exact state

I haven’t touched the state since 2014. But I poked around again in Bamboo and can provide this on how things are set up:

  • master` gets built by Bamboo every time a commit is pushed.
  • There are two deploy plans for Modulus Core (the grails app): one for modules-stg.openmrs.org, the other for modules.openmrs.org. These are run manually using any build of Modulus from Bamboo.
  • Modulus UI has a similar set of deploy projects.
  • The prod branch is the repository is outdated and should be removed. The staging and production tags were once used to select the version used to build for stg and prod, but this has been disabled in Bamboo. I don’t know if I disabled this or someone else did.

Currently modules-stg.openmrs.org is down (even Tomcat is unreachable). I’d like to see the build from master deployed there first, and then I think we should update prod.

@elliott, another question, do you know offhand if I can access the REST api directly via postman? And if so, what the url would be?

https://modules.openmrs.org/modulus/api is the base URI. Documentation of the API is at https://openmrs.github.io/openmrs-contrib-modulus/

Thanks @elliott! I was able to delete the offending module via the REST interface. (FYI @mseaton.)

For future reference, I logged into modulus with my OpenMRS ID in chrome, then via the javascript console I did:

$.ajax({ method: "DELETE", url: "https://modules.openmrs.org/modulus/api/modules/244" });
1 Like

@elliott now that modules-stg.openmrs.org is running, do you still have some time to update it with the build from master?

It’s built using bamboo…should be an easy thing to add

I used bamboo to deploy the latest modulus-ui build to the staging server. (Logs here.)

@elliott (or @r0bby), do you know if the modules-stg server is pointing at the prod database, or if it has its own?

The owner and maintainers appear null on the one module I looked at: https://modules-stg.openmrs.org/#/show/119/reporting but I don’t know if that’s a demo data issue or something else. And I don’t seem to have administrator power on this staging server (or, I don’t see additional links I was expecting).

I can probably copy over the production db if you want – it’s pretty simple to do

If that’s easy to do, sure! More valuable would be ensuring that I have the same privileges on modules-stg as on modules so that I can confidently test things like deleting modules.

Just found spam in modulus

I copied the db – the files are not there. Tarballing the uploads now and will transfer them over.

Looks like this duplication is also happening with the address hierarchy module too - one with id 3 and another with id 246

I deleted this, as well as some duplicates of htmlformflowsheet.

I noticed that these were all uploaded by the same user.

@manuel1972, what’s going on here? Normally the author of a module uploads it to modules.openmrs.org. Is there a reason why you are reuploading existing modules?

1 Like

Darius, based on the lack of activity it seems it’s a spam account. We should have been doing checksums(SHA) all along.

I deleted several more duplicate modules (all from this same spam user), as mentioned on https://issues.openmrs.org/browse/MOD-94.

Since the modulus code has been updated, and jQuery is no longer available, but there’s no admin function to delete modules, I needed to use the following hack to make REST calls:

  1. Log into https://modules.openmrs.org
  2. Inspect Element (in Chrome) and find the Authorization request header sent with a REST request (should be “Bearer …”)
  3. Using Postman manually add a header with name=Authorization and value=(copied from previous step)
  4. Using Postman, DELETE https://modules.openmrs.org/modulus/api/modules/252
1 Like

@darius, This needs to be documented on the wiki. You can deploy via Bamboo.